@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!sameClassAs(obj)) { return false; } Id other = (Id) obj; return eq(value, other.value); }
/** * Returns whether it has the value. * * @return whether it has the value */ public boolean hasValue() { return getValue() != null; }
/** * Immutable constructor. * * @param value value. */ public Id(Integer value) { super(); setValue(value); setImmutable(true); }
/** * Sets the value. * * @param value value or <code>null</code> to reset */ public void setValue(Integer value) { throwExceptionIfImmutable(); this.value = value; }
@Override public void declareExtensions(ExtensionProfile extProfile) { if (extProfile.isDeclared(MergedInto.class)) { return; } extProfile.declare(MergedInto.class, Id.getDefaultDescription(true, false)); extProfile.declare(MergedInto.class, Project.class); }
/** * Sets the value. * * @param value value or <code>null</code> to reset */ public void setValue(Integer value) { throwExceptionIfImmutable(); this.value = value; }
@Override public void declareExtensions(ExtensionProfile extProfile) { if (extProfile.isDeclared(BlockedOn.class)) { return; } extProfile.declare(BlockedOn.class, Id.getDefaultDescription(true, false)); extProfile.declare(BlockedOn.class, Project.class); }
/** * Immutable constructor. * * @param value value. */ public Id(Integer value) { super(); setValue(value); setImmutable(true); }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!sameClassAs(obj)) { return false; } Id other = (Id) obj; return eq(value, other.value); }
/** * Returns whether it has the value. * * @return whether it has the value */ public boolean hasValue() { return getValue() != null; }
@Override public void declareExtensions(ExtensionProfile extProfile) { if (extProfile.isDeclared(Blocking.class)) { return; } extProfile.declare(Blocking.class, Id.getDefaultDescription(true, false)); extProfile.declare(Blocking.class, Project.class); }