Added new constructor & subaudit existence to AuditResult.

keep-around/a40088ecfe2344580f5e56783d29e1212c0fd597
Pingex aka Raphaël 9 years ago
parent 3c354c0f00
commit 7bc0409d8c

@ -50,6 +50,17 @@ public class AuditResult
this.subAuditsResults = null; this.subAuditsResults = null;
} }
/**
* Constructor without sub audits or a message.
* @param opcode The result code of the operation.
*/
public AuditResult(ResultCode opcode)
{
this.opcode = opcode;
this.message = null;
this.subAuditsResults = null;
}
/** /**
* Result code for this audit * Result code for this audit
*/ */
@ -77,6 +88,15 @@ public class AuditResult
else throw new UnsupportedOperationException(); else throw new UnsupportedOperationException();
} }
/**
* Tells whether this object contains subaudits.
* @return `true` when this object contains subaudits, `false` otherwise
*/
public boolean hasSubAudits()
{
return subAuditsResults != null;
}
/** /**
* All the possible result codes for an andit. * All the possible result codes for an andit.
*/ */