Package ddf.catalog.data.impl
Class AttributeImpl
java.lang.Object
ddf.catalog.data.impl.AttributeImpl
- All Implemented Interfaces:
ddf.catalog.data.Attribute,Serializable
A simple implementation of
Attribute.
This class is Serializable and care should be taken with compatibility if changes are
made.
For what constitutes a compatible change in serialization, see Sun's Guidelines.
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAttributeImpl(ddf.catalog.data.Attribute attribute) Copy ConstructorAttributeImpl(String name, Serializable value) ConstructorAttributeImpl(String name, List<? extends Serializable> values) Multivalued Constructor -
Method Summary
Modifier and TypeMethodDescriptionvoidaddValue(Serializable value) Adds a value to thisAttributevoidClears allAttributevaluesbooleanstatic AttributeImplfromMultipleValues(String name, List<? extends Serializable> values) Static factory method to avoid ambiguous constructor references when passing a value that implements bothListandSerializable, such as anArrayList.static AttributeImplfromSingleValue(String name, Serializable value) Static factory method to avoid ambiguous constructor references when passing a value that implements bothListandSerializable, such as anArrayList.getName()getValue()inthashCode()toString()
-
Field Details
-
name
Nontransient field that holds the name of theAttribute.
-
-
Constructor Details
-
AttributeImpl
Constructor- Parameters:
name- - the name of thisAttributevalue- - the value of thisAttribute
-
AttributeImpl
Multivalued Constructor- Parameters:
name- - the name of thisAttributevalues- - the value of thisAttribute
-
AttributeImpl
public AttributeImpl(ddf.catalog.data.Attribute attribute) Copy Constructor
-
-
Method Details
-
fromSingleValue
Static factory method to avoid ambiguous constructor references when passing a value that implements bothListandSerializable, such as anArrayList. SeeAttributeImpl(String, Serializable). -
fromMultipleValues
Static factory method to avoid ambiguous constructor references when passing a value that implements bothListandSerializable, such as anArrayList. SeeAttributeImpl(String, List). -
getName
- Specified by:
getNamein interfaceddf.catalog.data.Attribute
-
getValue
- Specified by:
getValuein interfaceddf.catalog.data.Attribute
-
getValues
- Specified by:
getValuesin interfaceddf.catalog.data.Attribute
-
addValue
Adds a value to thisAttribute- Parameters:
value- the value to add
-
clearValues
public void clearValues()Clears allAttributevalues -
equals
-
hashCode
public int hashCode() -
toString
-