public class FeatureImpl extends java.lang.Object implements Feature
Feature.FeatureType
Constructor and Description |
---|
FeatureImpl(long id, FeatureElement[] elements, CategorizedUserData cud)
Constructs a feature.
|
Modifier and Type | Method and Description |
---|---|
void |
addElement(int i, FeatureElement element)
Adds a feature element at the ith position of the feature.
|
void |
addElements(FeatureElement[] newElements)
Appends a list of elements to the end of the feature.
|
java.lang.Object |
clone()
Support cloneable
|
void |
deleteElement(int i)
Deletes the ith element in the feature.
|
boolean |
equals(java.lang.Object o)
Returns true if the input feature consists of the same set of feature elements in the same order as this feature.
|
int |
findElement(FeatureElement element)
Finds the input feature element in this feature, and returns the feature element index.
|
CategorizedUserData |
getCategorizedUserData()
Returns categorized user data.
|
CategorizedUserData |
getCategorizedUserData()
Returns categorized user data.
|
FeatureElement |
getElement(int i)
Returns the ith element in the feature.
|
FeatureElement[] |
getElements()
Returns the feature elements in the feature.
|
long |
getId()
Returns the feature ID.
|
int |
getNumberOfElements()
Returns the number of elements in the feature.
|
Feature.FeatureType |
getType()
Returns the feature type.
|
UserData |
getUserData(int category)
Returns user data for the specified category.
|
UserData |
getUserData(int category)
Returns user data for the specified category.
|
void |
setCategorizedUserData(CategorizedUserData userData)
Sets categorized user data.
|
void |
setCategorizedUserData(CategorizedUserData cud)
Sets categorized user data.
|
void |
setElement(int i, FeatureElement element)
Sets the ith feature element.
|
void |
setUserData(int category, UserData userData)
Sets user data for the specified category.
|
void |
setUserData(int category, UserData userData)
Sets user data for the specified category.
|
java.lang.String |
toString() |
public FeatureImpl(long id, FeatureElement[] elements, CategorizedUserData cud)
id
- feature IDtype
- feature typeelements
- feature elementscud
- categorized user data associated with the featurepublic long getId()
Feature
public Feature.FeatureType getType()
Feature
public FeatureElement getElement(int i)
Feature
getElement
in interface Feature
i
- feature element indexpublic FeatureElement[] getElements()
Feature
getElements
in interface Feature
public int getNumberOfElements()
Feature
getNumberOfElements
in interface Feature
public void addElement(int i, FeatureElement element)
Feature
addElement
in interface Feature
i
- feature element indexpublic void addElements(FeatureElement[] newElements)
Feature
addElements
in interface Feature
public void deleteElement(int i)
Feature
deleteElement
in interface Feature
i
- feature element indexpublic int findElement(FeatureElement element)
Feature
findElement
in interface Feature
public void setElement(int i, FeatureElement element)
Feature
setElement
in interface Feature
i
- feature element indexpublic java.lang.Object clone() throws java.lang.CloneNotSupportedException
java.lang.CloneNotSupportedException
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
o
-public java.lang.String toString()
toString
in class java.lang.Object
public CategorizedUserData getCategorizedUserData()
public void setCategorizedUserData(CategorizedUserData userData)
userData
-public UserData getUserData(int category)
public void setUserData(int category, UserData userData)
userData
-public CategorizedUserData getCategorizedUserData()
public void setCategorizedUserData(CategorizedUserData cud)
public UserData getUserData(int category)
public void setUserData(int category, UserData userData)