Package org.opengis.example.util
Class SimpleName.Local
- Object
-
- SimpleName
-
- Local
-
- All Implemented Interfaces:
Serializable,Comparable<GenericName>,GenericName,LocalName
- Direct Known Subclasses:
SimpleName.Member,SimpleName.Type
- Enclosing class:
- SimpleName
public static class SimpleName.Local extends SimpleName implements LocalName
ALocalNamespecialization ofSimpleName. The JNDI name wrapped by this class shall contain exactly one component. In such case the head, the tip and the parsed names are simplythisinstance.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class SimpleName
SimpleName.Local, SimpleName.Member, SimpleName.Scoped, SimpleName.Type
-
-
Field Summary
-
Fields inherited from class SimpleName
name
-
-
Constructor Summary
Constructors Constructor Description Local(SimpleNameSpace scope, Name name)Creates a new instance backed by the given JNDI name.
-
Method Summary
Modifier and Type Method Description List<LocalName>getParsedNames()Since this object is itself a locale name, returns a singleton list containing onlythis.LocalNamehead()Returnsthissince this object is already a local name.LocalNametip()Returnsthissince this object is already a local name.-
Methods inherited from class SimpleName
compareTo, depth, equals, hashCode, jndiName, push, scope, toFullyQualifiedName, toInternationalString, toString
-
Methods inherited from interface GenericName
compareTo, push, scope, toFullyQualifiedName, toInternationalString
-
-
-
-
Constructor Detail
-
Local
public Local(SimpleNameSpace scope, Name name) throws IllegalArgumentException
Creates a new instance backed by the given JNDI name. This constructor does not clone the given JNDI name. While this implementation is robust to change in the wrapped object, it is a better practice to keep the JNDI name unmodified afterSimpleNameconstruction.- Parameters:
scope- the scope (name space) in which the given name is local.name- the JNDI name wrapped by thisSimpleName(not cloned).- Throws:
IllegalArgumentException- if the given name does not have exactly 1 component.
-
-
Method Detail
-
getParsedNames
public List<LocalName> getParsedNames()
Since this object is itself a locale name, returns a singleton list containing onlythis.- Specified by:
getParsedNamesin interfaceGenericName- Specified by:
getParsedNamesin interfaceLocalName- Overrides:
getParsedNamesin classSimpleName- See Also:
Name.getAll()
-
head
public LocalName head()
Returnsthissince this object is already a local name.- Specified by:
headin interfaceGenericName- Specified by:
headin interfaceLocalName- Overrides:
headin classSimpleName- Returns:
this.- See Also:
Name.get(int)
-
tip
public LocalName tip()
Returnsthissince this object is already a local name.- Specified by:
tipin interfaceGenericName- Specified by:
tipin interfaceLocalName- Overrides:
tipin classSimpleName- Returns:
this.- See Also:
Name.get(int)
-
-