/** * Returns the programmatic name of this constant together with its {@linkplain #identifier() identifier}, if any. * * @since 3.1 */ @Override public String[] names() { return new String[] {name(), identifier}; }
/** * Returns the programmatic name of this constant together with its {@linkplain #identifier() identifier}, if any. * * @since 3.1 */ @Override public String[] names() { return new String[] {name(), identifier}; }
/** * Returns a string representation of this restriction. */ @Override public String toString() { final StringBuilder buffer = new StringBuilder(Classes.getShortClassName(this)).append('['); String separator = ""; if (obligation != null) { buffer.append(obligation.name()); separator = ", "; } if (range != null) { buffer.append(separator).append("range=").append(range); separator = ", "; } if (validValues != null) { buffer.append(separator).append("validValues=").append(validValues); } return buffer.append(']').toString(); } }
/** * Returns a string representation of this restriction. */ @Override public String toString() { final StringBuilder buffer = new StringBuilder(Classes.getShortClassName(this)).append('['); String separator = ""; if (obligation != null) { buffer.append(obligation.name()); separator = ", "; } if (range != null) { buffer.append(separator).append("range=").append(range); separator = ", "; } if (validValues != null) { buffer.append(separator).append("validValues=").append(validValues); } return buffer.append(']').toString(); } }
/** * Converts the given {@code ExtendedElementInformation} to a {@code ValueRestriction}. */ public static ValueRestriction create(final ExtendedElementInformation info) { if (info != null) { final Obligation o = info.getObligation(); final InternationalString domain = info.getDomainValue(); return create((o != null) ? Obligation.valueOf(o.name()) : null, (domain instanceof NumberRange<?>) ? (NumberRange<?>) domain : null, (domain instanceof Set<?>) ? (Set<?>) domain : null); } return null; }