/** * Compares this name with the specified object for order. Returns a negative integer, zero, or * a positive integer as this name lexicographically precedes, is equals to, or follows the * specified object. * * @param object The object to compare with. * @return -1 if this identifier precedes the given object, +1 if it follows it. */ public int compareTo(final GenericName object) { return getName().compareTo(object); }
/** * Compares this name with the specified object for order. Returns a negative integer, * zero, or a positive integer as this name lexicographically precedes, is equal to, * or follows the specified object. * * @param object the object to compare with. * @return -1 if this identifier precedes the given object, +1 if it follows it. */ @Override public int compareTo(final GenericName object) { return getName().compareTo(object); }
/** * Compares this name with the specified object for order. Returns a negative integer, * zero, or a positive integer as this name lexicographically precedes, is equal to, * or follows the specified object. * * @param object the object to compare with. * @return -1 if this identifier precedes the given object, +1 if it follows it. */ @Override public int compareTo(final GenericName object) { return getName().compareTo(object); }
assertEquals("GenericName: should be comparable to itself.", 0, object.compareTo(object));
assertEquals("GenericName: shall be comparable to itself.", 0, object.compareTo(object));
throw new IllegalArgumentException(Errors.format(Errors.Keys.IllegalMemberType_2, name, type)); if (fullTypeName.compareTo(name.scope().name()) != 0) { throw new IllegalArgumentException(Errors.format(Errors.Keys.InconsistentNamespace_2, fullTypeName, name.toFullyQualifiedName()));
throw new IllegalArgumentException(Errors.format(Errors.Keys.IllegalMemberType_2, name, type)); if (fullTypeName.compareTo(name.scope().name()) != 0) { throw new IllegalArgumentException(Errors.format(Errors.Keys.InconsistentNamespace_2, fullTypeName, name.toFullyQualifiedName()));