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>
COMPARATOR
Sorts namespaces first by prefix and then by Namespace.getName() () name};null
values are sorted before other values.private static long
serialVersionUID
-
Constructor Summary
Constructors Constructor Description AbstractNamespace()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(Namespace o)
boolean
equals(java.lang.Object object)
Compares this namespace to another object.int
hashCode()
Computes the hash code of this namespace.java.lang.String
toString()
-
-
-
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};null
values are sorted before other values.
-
-
Method Detail
-
compareTo
public int compareTo(Namespace o)
- Specified by:
compareTo
in interfacejava.lang.Comparable<Namespace>
-
equals
public boolean equals(java.lang.Object object)
Description copied from interface:Namespace
Compares this namespace to another object.
-
hashCode
public int hashCode()
Description copied from interface:Namespace
Computes the hash code of this namespace.- Specified by:
hashCode
in interfaceNamespace
- Overrides:
hashCode
in 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:
toString
in classjava.lang.Object
-
-