public class LocalName extends GenericName implements LocalName
GenericName
, or a pointer to another name space (with a new GenericName
) one step closer
to the target of the identifier.NameFactory
,
Serialized FormDEFAULT_SEPARATOR
Constructor and Description |
---|
LocalName(CharSequence name)
Constructs a local name from the specified string with no scope.
|
Modifier and Type | Method and Description |
---|---|
ScopedName |
asScopedName()
Deprecated.
Replaced by
toFullyQualifiedName() . |
int |
compareTo(GenericName object)
Compares this name with the specified object for order.
|
int |
depth()
Returns the depth, which is always 1 for a local name.
|
boolean |
equals(Object object)
Compares this local name with the specified object for equality.
|
List<LocalName> |
getParsedNames()
Returns the sequence of local name for this generic name.
|
GenericName |
getScope()
Deprecated.
Replaced by
scope() . |
int |
hashCode()
Returns a hash code value for this local name.
|
LocalName |
head()
Since this object is already a local name, this method always returns
this . |
ScopedName |
push(GenericName scope)
Returns this name expanded with the specified scope.
|
NameSpace |
scope()
Returns the scope (name space) in which this name is local.
|
LocalName |
tip()
Since this object is already a local name, this method always returns
this . |
GenericName |
toFullyQualifiedName()
Returns a view of this name as a fully-qualified name.
|
InternationalString |
toInternationalString()
Returns a local-dependent string representation of this locale name.
|
String |
toString()
Returns a locale-independant string representation of this local name.
|
asLocalName, name
name
public LocalName(CharSequence name)
InternationalString
, then the
toString(null)
method will
be used in order to fetch an unlocalized name. Otherwise, the
toString()
method will be used.name
- The local name (never null
).@Deprecated public GenericName getScope()
scope()
.getScope
in class GenericName
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 GenericName
scope
in class GenericName
public int depth()
depth
in interface GenericName
depth
in interface LocalName
depth
in class GenericName
public List<LocalName> getParsedNames()
this
.getParsedNames
in interface GenericName
getParsedNames
in interface LocalName
getParsedNames
in class GenericName
public LocalName head()
this
.head
in interface GenericName
head
in interface LocalName
head
in class GenericName
public LocalName tip()
this
.tip
in interface GenericName
tip
in interface LocalName
tip
in class GenericName
@Deprecated public ScopedName asScopedName()
toFullyQualifiedName()
.null
if this name has no scope.asScopedName
in class GenericName
public GenericName toFullyQualifiedName()
null
.toFullyQualifiedName
in interface GenericName
null
).public ScopedName push(GenericName scope)
name
with this
. In pseudo-code, the following
relationships must hold:
push(name).getParsedList() ==
name.getParsedList().addAll(getParsedNames())
push(name).scope() == name.scope()
Note: Those conditions can be understood in terms of the Java equals
method instead of the Java identity comparator ==
.
push
in interface GenericName
scope
- The name to use as prefix.public String toString()
toString
in interface GenericName
toString
in interface LocalName
toString
in class GenericName
public InternationalString toInternationalString()
toInternationalString
in interface GenericName
toInternationalString
in class GenericName
public int compareTo(GenericName object)
compareTo
in interface Comparable<GenericName>
compareTo
in class GenericName
object
- The name to compare with this name.public boolean equals(Object object)
equals
in class GenericName
object
- The object to compare with this name.true
if the given object is equals to this one.public int hashCode()
hashCode
in class GenericName
Copyright © 1996–2019 Geotools. All rights reserved.