framework/application/api/src/main/java/org/ldp4j/application/vocabulary/ImmutableTerm.java
@Override
	public int compareTo(Term other) {
		ImmutableTerm self = this;
		if(self.getDeclaringVocabulary() != other.getDeclaringVocabulary()) {
			throw new ClassCastException();
		}
		return self.ordinal - other.ordinal();
	}
@Override
	public int compareTo(Term other) {
		ImmutableTerm self = this;
		if(self.getDeclaringVocabulary() != other.getDeclaringVocabulary()) {
			throw new ClassCastException();
		}
		return self.ordinal - other.ordinal();
	}
@ Override public int compareTo ( Term other ) { ImmutableTerm self = this ; if ( self . getDeclaringVocabulary ( ) != other . getDeclaringVocabulary ( ) ) { throw new ClassCastException ( ) ; } return self . ordinal - other . ordinal ( ) ; }
Compares this term with the specified object for order. Returns a
negative integer, zero, or a positive integer as this object is less
than, equal to, or greater than the specified object.

Term constants are only comparable to other term constants of the same
vocabulary. The natural order implemented by this method is the order in
which the constants are declared.
Compares this term with the specified object for order . Returns a negative integer zero or a positive integer as this object is less than equal to or greater than the specified object .