Package org.apache.sis.util.iso
Class DefaultMemberName
java.lang.Object
org.apache.sis.util.iso.AbstractName
org.apache.sis.util.iso.DefaultLocalName
org.apache.sis.util.iso.DefaultMemberName
- All Implemented Interfaces:
Serializable
,Comparable<org.opengis.util.GenericName>
,org.opengis.util.GenericName
,org.opengis.util.LocalName
,org.opengis.util.MemberName
The name to identify a member of a record.
DefaultMemberName
can be instantiated by any of the following methods:
DefaultNameFactory.createMemberName(NameSpace, CharSequence, TypeName)
- Similar static convenience method in
Names
.
Immutability and thread safety
This class is immutable and thus inherently thread-safe if theNameSpace
, CharSequence
and
TypeName
arguments given to the constructor are also immutable. Subclasses shall make sure that any
overridden methods remain safe to call from multiple threads and do not change any public MemberName
state.- Since:
- 0.3
- Version:
- 0.5
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final org.opengis.util.TypeName
The type of the data associated with the record member.private static final long
Serial number for inter-operability with different versions.Fields inherited from class org.apache.sis.util.iso.DefaultLocalName
name, scope
Fields inherited from class org.apache.sis.util.iso.AbstractName
asString, fullyQualified
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
Empty constructor to be used by JAXB only.protected
DefaultMemberName
(org.opengis.util.NameSpace scope, CharSequence name, org.opengis.util.TypeName attributeType) Constructs a member name from the given character sequence and attribute type. -
Method Summary
Modifier and TypeMethodDescriptionstatic DefaultMemberName
castOrCopy
(org.opengis.util.MemberName object) Returns a SIS member name implementation with the values of the given arbitrary implementation.(package private) final int
Invoked byAbstractName.hashCode()
for computing the hash code value when first needed.boolean
Compares this member name with the specified object for equality.org.opengis.util.TypeName
Returns the type of the data associated with the record member.Methods inherited from class org.apache.sis.util.iso.DefaultLocalName
castOrCopy, compareTo, depth, getParsedNames, head, scope, tip, toInternationalString, toString
Methods inherited from class org.apache.sis.util.iso.AbstractName
arraySize, castOrCopy, hashCode, push, toFullyQualifiedName
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Comparable
compareTo
Methods inherited from interface org.opengis.util.GenericName
push, scope, toFullyQualifiedName, toInternationalString
Methods inherited from interface org.opengis.util.LocalName
depth, getParsedNames, head, tip, toString
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDSerial number for inter-operability with different versions.- See Also:
-
attributeType
private final org.opengis.util.TypeName attributeTypeThe type of the data associated with the record member.
-
-
Constructor Details
-
DefaultMemberName
protected DefaultMemberName(org.opengis.util.NameSpace scope, CharSequence name, org.opengis.util.TypeName attributeType) Constructs a member name from the given character sequence and attribute type.- Parameters:
scope
- the scope of this name, ornull
for a global scope.name
- the local name (nevernull
).attributeType
- the type of the data associated with the record member (cannot benull
).
-
DefaultMemberName
private DefaultMemberName()Empty constructor to be used by JAXB only. Despite itsfinal
declaration, theattributeType
field will be set by JAXB during unmarshalling.
-
-
Method Details
-
castOrCopy
Returns a SIS member name implementation with the values of the given arbitrary implementation. This method performs the first applicable action in the following choices:- If the given object is
null
, then this method returnsnull
. - Otherwise if the given object is already an instance of
DefaultMemberName
, then it is returned unchanged. - Otherwise a new
DefaultMemberName
instance is created with the same values than the given name.
- Parameters:
object
- the object to get as a SIS implementation, ornull
if none.- Returns:
- a SIS implementation containing the values of the given object (may be the
given object itself), or
null
if the argument was null. - Since:
- 0.5
- If the given object is
-
getAttributeType
public org.opengis.util.TypeName getAttributeType()Returns the type of the data associated with the record member.- Specified by:
getAttributeType
in interfaceorg.opengis.util.MemberName
- Returns:
- the type of the data associated with the record member.
-
equals
Compares this member name with the specified object for equality.- Overrides:
equals
in classDefaultLocalName
- Parameters:
object
- the object to compare with this name for equality.- Returns:
true
if the given object is equal to this name.
-
computeHashCode
final int computeHashCode()Invoked byAbstractName.hashCode()
for computing the hash code value when first needed.- Overrides:
computeHashCode
in classDefaultLocalName
-