public abstract class GenericName extends Object implements GenericName, Serializable
Note: this class has a natural ordering that is inconsistent with equals. The natural ordering may be case-insensitive and ignores the character separator between name elements.
NameFactory,
Serialized Form| Modifier and Type | Field and Description |
|---|---|
static char |
DEFAULT_SEPARATOR
The default separator character.
|
| Modifier | Constructor and Description |
|---|---|
protected |
GenericName()
Creates a new instance of generic name.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(GenericName that)
Compares this name with the specified object for order.
|
int |
depth()
Returns the depth of this name within the namespace hierarchy.
|
boolean |
equals(Object object)
Compares this generic name with the specified object for equality.
|
protected abstract GenericName |
getInternalScope()
Returns the scope (name space) of this generic name.
|
abstract List<LocalName> |
getParsedNames()
Returns the sequence of local names making this generic name.
|
int |
hashCode()
Returns a hash code value for this generic name.
|
LocalName |
head()
Returns the first element in the sequence of parsed names.
|
NameSpace |
scope()
Returns the scope (name space) in which this name is local.
|
LocalName |
tip()
Returns the last element in the sequence of parsed names.
|
InternationalString |
toInternationalString()
Returns a local-dependent string representation of this generic name.
|
String |
toString()
Returns a string representation of this generic name.
|
push, toFullyQualifiedNamepublic static final char DEFAULT_SEPARATOR
public NameSpace scope()
"util.GenericName") and is associated
with a name space having the name "org.opengis", then the
fully qualified name would be "org.opengis.util.GenericName".scope in interface GenericNameprotected abstract GenericName getInternalScope()
null. Can be a no-op if the subclass overrides scope()public int depth()
LocalName, it is always one. For a ScopedName it is some number greater than or equal to 2.
The depth is the length of the list returned by the getParsedNames() method. As
such it is a derived parameter.
depth in interface GenericNamepublic abstract List<LocalName> getParsedNames()
getParsedNames in interface GenericNamepublic LocalName head()
head in interface GenericNamepublic LocalName tip()
tip in interface GenericNamepublic String toString()
getParsedNames() separated by an
arbitrary character (usually : or /). This rule implies that the toString() method for a scoped name will contains the scope, while
the toString() method for the local version of the same name
will not contains the scope.toString in interface GenericNametoString in class Objectpublic InternationalString toInternationalString()
toString() except that each element has been localized in the
specified locale. If no international
string is available, then this method should returns an implementation mapping to toString() for all locales.toInternationalString in interface GenericNamepublic int compareTo(GenericName that)
compareTo in interface Comparable<GenericName>that - The name to compare with this name.public boolean equals(Object object)
Copyright © 1996–2021 Geotools. All rights reserved.