|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.rational.rpe.common.data.Feature
public class Feature
A Feature is a collection of Property
and other Feature objects.
Constructor Summary | |
---|---|
Feature()
|
|
Feature(java.lang.String id,
java.lang.String tag)
Creates a new feature with the given id and tag |
Method Summary | |
---|---|
void |
addFeature(Feature feature)
Adds the provided feature as a direct child feature of the current feature. |
void |
addFeature(int location,
Feature feature)
Adds the given feature to the current feature at the given position. |
void |
addFeatures(java.util.Collection<Feature> other)
Adds all of the features from the provided collection to this feature as direct children. |
void |
addProperties(java.util.Collection<Property> properties)
Adds all of the properties from the provided collection to this feature as direct children |
void |
addProperty(Property property)
Adds the property to this feature as a direct child property |
void |
addPropertyAfter(Property property,
Property other)
Deprecated. |
void |
addPropertyBefore(Property property,
Property other)
Deprecated. |
void |
copyContent(Feature other)
Copies the content of the other feature to this one. |
Feature |
copyOf()
Returns a copy of this feature and all of its children. |
java.util.List<Feature> |
getFeatures()
Returns an unmodifiable collection of Features. |
java.lang.String |
getId()
Returns the tag of this feature |
Feature |
getNewInstance()
Creates and returns a new feature instance. |
java.util.List<Property> |
getProperties()
Returns an unmodifiable collection of properties. |
Property |
getProperty(java.lang.String name)
Returns the property with this name if it is found as a direct child of this feature. |
Property |
getPropertyFast(java.lang.String name)
Searches for a property with this name in the first child feature of the current feature. |
java.lang.String |
getTag()
Returns the tag of this feature |
java.lang.String |
getType()
Returns the tag attribute of this feature |
void |
removeAll(java.util.Collection<Feature> deleted)
Removes all of the features provided in the collection argument from this feature. |
void |
removeAllFeatures()
Removes all the direct child features. |
void |
removeAllProperties()
Removes all the direct child properties. |
boolean |
removeFeature(Feature feature)
Removes the given feature from the children of this feature. |
boolean |
removeProperty(Property prop)
Removes the given property from this feature, if found. |
void |
setId(java.lang.String id)
Sets the id of this feature |
void |
setTag(java.lang.String tag)
Sets the tag of this feature |
void |
setType(java.lang.String type)
Sets the type attribute of this feature |
void |
sort(java.util.Comparator<Feature> featureComparator,
java.util.Comparator<Property> propertyComparator,
boolean deep)
Sorts the features and the properties of this feature by using the provided comparators. |
void |
visit(Visitable parent,
com.ibm.rational.rpe.common.template.visitor.Visitor v)
Implementation of . |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Feature()
public Feature(java.lang.String id, java.lang.String tag)
Method Detail |
---|
public Feature getNewInstance()
public Property getPropertyFast(java.lang.String name)
name
- - the name of the property to look for *
public Property getProperty(java.lang.String name)
name
- - the name of the property to look for *
public void setTag(java.lang.String tag)
public java.lang.String getTag()
public void setId(java.lang.String id)
public java.lang.String getId()
public void setType(java.lang.String type)
public java.lang.String getType()
public void addProperty(Property property)
public void addProperties(java.util.Collection<Property> properties)
@Deprecated public void addPropertyBefore(Property property, Property other)
property
- other
- @Deprecated public void addPropertyAfter(Property property, Property other)
property
- other
- public java.util.List<Property> getProperties()
public boolean removeProperty(Property prop)
prop
-
public void addFeature(Feature feature)
feature
- public void addFeatures(java.util.Collection<Feature> other)
public void addFeature(int location, Feature feature)
public boolean removeFeature(Feature feature)
public void removeAll(java.util.Collection<Feature> deleted)
public java.util.List<Feature> getFeatures()
public Feature copyOf()
public void copyContent(Feature other)
other
feature to this one. Unlike clones, no duplicates are created for the child properties and features.
other
- public void visit(Visitable parent, com.ibm.rational.rpe.common.template.visitor.Visitor v)
visit
in interface Visitable
parent
- - (optional) the parent visitable object that triggered the visit of this objectv
- - the visitorpublic void removeAllProperties()
public void removeAllFeatures()
public void sort(java.util.Comparator<Feature> featureComparator, java.util.Comparator<Property> propertyComparator, boolean deep)
featureComparator
- propertyComparator
- deep
-
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |