Package org.opengis.example.util
Class SimpleName.Member
- Object
-
- SimpleName
-
- SimpleName.Local
-
- Member
-
- All Implemented Interfaces:
Serializable
,Comparable<GenericName>
,GenericName
,LocalName
,MemberName
- Enclosing class:
- SimpleName
public static class SimpleName.Member extends SimpleName.Local implements MemberName
AMemberName
specialization ofSimpleName.Local
. The JNDI name wrapped by this class shall contain exactly one component. In such case the head, the tip and the parsed names are simplythis
instance.- 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 Member(SimpleNameSpace scope, Name name, TypeName attributeType)
Creates a new instance backed by the given JNDI name.
-
Method Summary
Modifier and Type Method Description boolean
equals(Object other)
Compares the given object to this name for equality.TypeName
getAttributeType()
Returns the type of the data associated with the record member.-
Methods inherited from class SimpleName.Local
getParsedNames, head, tip
-
Methods inherited from class SimpleName
compareTo, depth, hashCode, jndiName, push, scope, toFullyQualifiedName, toInternationalString, toString
-
Methods inherited from interface GenericName
compareTo, push, scope, toFullyQualifiedName, toInternationalString
-
Methods inherited from interface LocalName
depth, getParsedNames, head, tip
-
Methods inherited from interface MemberName
toString
-
-
-
-
Constructor Detail
-
Member
public Member(SimpleNameSpace scope, Name name, TypeName attributeType) 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 afterSimpleName
construction.- Parameters:
scope
- the scope (name space) in which the given name is local, ornull
.name
- the JNDI name wrapped by thisSimpleName
(not cloned).attributeType
- the type of the data associated with the record member.- Throws:
IllegalArgumentException
- if the given name does not have exactly 1 component.
-
-
Method Detail
-
getAttributeType
public TypeName getAttributeType()
Returns the type of the data associated with the record member.- Specified by:
getAttributeType
in interfaceMemberName
-
equals
public boolean equals(Object other)
Compares the given object to this name for equality. This method compares the attribute type in addition to the field compared by the super-class.- Overrides:
equals
in classSimpleName
- Parameters:
other
- the other object to compare to this name.
-
-