diff --git a/src/main/java/net/pingex/dcf/commands/audit/AuditResult.java b/src/main/java/net/pingex/dcf/commands/audit/AuditResult.java index c24901f..928d612 100644 --- a/src/main/java/net/pingex/dcf/commands/audit/AuditResult.java +++ b/src/main/java/net/pingex/dcf/commands/audit/AuditResult.java @@ -50,6 +50,17 @@ public class AuditResult 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 */ @@ -77,6 +88,15 @@ public class AuditResult 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. */