public class ScopedName extends GenericName implements ScopedName
ScopedName contains a LocalName as
head and a GenericName, which may be a LocalName
or an other ScopedName, as tail.NameFactory,
Serialized FormDEFAULT_SEPARATOR| Constructor and Description |
|---|
ScopedName(GenericName scope,
char separator,
CharSequence name)
Constructs a scoped name from the specified international string.
|
ScopedName(GenericName scope,
CharSequence name)
Constructs a scoped name from the specified international string.
|
| Modifier and Type | Method and Description |
|---|---|
ScopedName |
asScopedName()
Deprecated.
Replaced by
toFullyQualifiedName(). |
boolean |
equals(Object object)
Compares this scoped 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
GenericName.scope(). |
char |
getSeparator()
Returns the separator character.
|
int |
hashCode()
Returns a hash code value for this generic name.
|
LocalName |
head()
Returns the head of this scoped name.
|
GenericName |
path()
Returns a name which contains every element of the parsed names
list except for the last element.
|
ScopedName |
push(GenericName scope)
Returns this name expanded with the specified scope.
|
GenericName |
tail()
Returns the tail of this scoped name.
|
LocalName |
tip()
Returns a view of this object as a local name.
|
GenericName |
toFullyQualifiedName()
Returns a view of this name as a fully-qualified name.
|
asLocalName, compareTo, depth, name, scope, toInternationalString, toStringtoStringdepth, name, scope, toInternationalStringcompareTopublic ScopedName(GenericName scope, 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.scope - The scope (or "tail") of the variable.name - The head (never null).public ScopedName(GenericName scope, char separator, 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.scope - The scope (or "tail") of the variable.separator - The separator character (usually ':' or '/').name - The head (never null).public LocalName head()
head().scope() == this.scope()
head in interface GenericNamehead in interface ScopedNamehead in class GenericNamepublic GenericName tail()
tail().getParsedNames() == this.getParsedNames().sublist(1,end)
Note: This condition can be understood in terms of the Java equals method instead of the Java identity comparator ==.
tail in interface ScopedNamepublic GenericName path()
path in interface ScopedNameFile.getPath()@Deprecated public GenericName getScope()
GenericName.scope().getScope in class GenericNamepublic char getSeparator()
@Deprecated public ScopedName asScopedName()
toFullyQualifiedName().this.asScopedName in class GenericNamepublic LocalName tip()
LocalName.toString() will differs.tip in interface GenericNametip in interface ScopedNametip in class GenericNamepublic List<LocalName> getParsedNames()
getParsedNames in interface GenericNamegetParsedNames in class GenericNamepublic GenericName toFullyQualifiedName()
null.toFullyQualifiedName in interface GenericNamenull).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.GenericName.scope()
push(head()).tail() == this
Note: Those conditions can be understood in terms of the Java equals method instead of the Java identity comparator ==.
push in interface GenericNamescope - The name to use as prefix.public boolean equals(Object object)
equals in class GenericNameobject - The object to compare with this name.true if the given object is equals to this one.public int hashCode()
hashCode in class GenericNameCopyright © 1996–2019 Geotools. All rights reserved.