Package org.apache.sis.util.iso
Class DefaultMemberName
- Object
-
- AbstractName
-
- DefaultLocalName
-
- DefaultMemberName
-
- All Implemented Interfaces:
Serializable
,Comparable<GenericName>
,GenericName
,LocalName
,MemberName
public class DefaultMemberName extends DefaultLocalName implements 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 safetyThis class is immutable and thus inherently thread-safe if theNameSpace
,CharSequence
andTypeName
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 publicMemberName
state.- Since:
- 0.3
- See Also:
DefaultTypeName
,DefaultNameFactory
,DefaultRecordType
, Serialized Form
Defined in the
sis-metadata
module
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
DefaultMemberName(NameSpace scope, CharSequence name, TypeName attributeType)
Constructs a member name from the given character sequence and attribute type.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DefaultMemberName
castOrCopy(MemberName object)
Returns a SIS member name implementation with the values of the given arbitrary implementation.boolean
equals(Object object)
Compares this member name with the specified object for equality.TypeName
getAttributeType()
Returns the type of the data associated with the record member.-
Methods inherited from class DefaultLocalName
castOrCopy, compareTo, depth, getParsedNames, head, scope, tip, toInternationalString, toString
-
Methods inherited from class AbstractName
castOrCopy, hashCode, push, toFullyQualifiedName
-
Methods inherited from class Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface Comparable
compareTo
-
Methods inherited from interface GenericName
push, scope, toFullyQualifiedName, toInternationalString
-
-
-
-
Constructor Detail
-
DefaultMemberName
protected DefaultMemberName(NameSpace scope, CharSequence name, 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 (can not benull
).
-
-
Method Detail
-
castOrCopy
public static DefaultMemberName castOrCopy(MemberName object)
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 TypeName getAttributeType()
Returns the type of the data associated with the record member.- Specified by:
getAttributeType
in interfaceMemberName
- Returns:
- the type of the data associated with the record member.
-
equals
public boolean equals(Object object)
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.
-
-