Package org.eclipse.rdf4j.model.base
Class AbstractNamespace
- java.lang.Object
-
- org.eclipse.rdf4j.model.base.AbstractNamespace
-
- Direct Known Subclasses:
ModelNamespace,SimpleNamespace,Vocabularies.VocabularyNamespace
public abstract class AbstractNamespace extends java.lang.Object implements Namespace
Base class forNamespace, offering common functionality.- Since:
- 3.5.0
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private static java.util.Comparator<Namespace>COMPARATORSorts namespaces first by prefix and then by Namespace.getName() () name};nullvalues are sorted before other values.private static longserialVersionUID
-
Constructor Summary
Constructors Constructor Description AbstractNamespace()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(Namespace o)booleanequals(java.lang.Object object)Compares this namespace to another object.inthashCode()Computes the hash code of this namespace.java.lang.StringtoString()
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
COMPARATOR
private static final java.util.Comparator<Namespace> COMPARATOR
Sorts namespaces first by prefix and then by Namespace.getName() () name};nullvalues are sorted before other values.
-
-
Method Detail
-
compareTo
public int compareTo(Namespace o)
- Specified by:
compareToin interfacejava.lang.Comparable<Namespace>
-
equals
public boolean equals(java.lang.Object object)
Description copied from interface:NamespaceCompares this namespace to another object.
-
hashCode
public int hashCode()
Description copied from interface:NamespaceComputes the hash code of this namespace.- Specified by:
hashCodein interfaceNamespace- Overrides:
hashCodein classjava.lang.Object- Returns:
- a hash code for this namespace computed as
Objects.hash(Namespace.getPrefix(),Namespace.getName())
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-