|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
T
- the type to work with, either MetadataValue or MetadataDefinition.public interface MetadataParent<T extends Metadata>
The Parent node of some metadata.
Method Summary | |
---|---|
Collection<T> |
addChild(T child)
Adds the child to the list of children. |
Collection<T> |
addChildren(Collection<T> children)
Adds the children to this parent's list of children. |
T |
getChild(String name)
Returns the child with the given name, or null if there is none. |
Collection<String> |
getChildNames()
The child names of this parent. |
Collection<T> |
getChildren()
The children of this parent. |
String |
getFullName()
The full name of the element. |
String |
getFullName(String separator)
The full name of the element, using the chosen separator string. |
String |
getFullNameFrom(MetadataParent<T> base)
Gives the full name from the given parent. |
int |
indexOf(String name)
The index of the child with the provided name. |
boolean |
requiresReplacement()
If this parent type requires to be replaced or not when a replacement command is issued. |
T |
setChild(int index,
T value)
Sets the child on index with the provided value, replacing any object currently on that index. |
net.sf.json.JSON |
toJson()
Convert this object into a JSON object. |
Method Detail |
---|
T getChild(String name)
name
- the name to search for.
Collection<T> addChild(T child)
child
- the child to add.
Collection<T> addChildren(Collection<T> children)
children
- the children to add.
Collection<T> getChildren()
Collection<String> getChildNames()
String getFullName()
String getFullName(String separator)
separator
- the separator string.
String getFullNameFrom(MetadataParent<T> base)
base
- the parent to base the tree structure from.
net.sf.json.JSON toJson()
boolean requiresReplacement()
MetadataValue.replacementOf(
com.sonyericsson.hudson.plugins.metadata.model.values.MetadataValue)
int indexOf(String name)
name
- the name of the child to find.
T setChild(int index, T value)
index
with the provided value, replacing any object currently on that index.
index
- the index to set.value
- the child to set.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |