info.bioinfweb.treegraph.document.undo.edit
Class AddSupportValuesEdit.LeafList
java.lang.Object
info.bioinfweb.treegraph.document.undo.edit.AddSupportValuesEdit.LeafList
- Enclosing class:
- AddSupportValuesEdit
private class AddSupportValuesEdit.LeafList
- extends Object
|
Method Summary |
void |
add(AddSupportValuesEdit.LeafList other)
|
boolean |
add(Node n)
|
String |
compareLists(NodeDataAdapter listAdapter,
AddSupportValuesEdit.LeafList other,
NodeDataAdapter otherAdapter)
Checks if the elements in the given lists have the same names as the elements
of this list. |
boolean |
contains(double value,
NodeDataAdapter adapter)
|
boolean |
contains(Node n)
|
boolean |
contains(String value,
NodeDataAdapter adapter)
|
boolean |
containsAllNames(NodeDataAdapter listAdapter,
AddSupportValuesEdit.LeafList other,
NodeDataAdapter otherAdapter)
Tests if the given list contains elements with the same text values as this
list. |
boolean |
containsAnyNameAndOther(NodeDataAdapter listAdapter,
AddSupportValuesEdit.LeafList other,
NodeDataAdapter otherAdapter)
Tests if the given list contains at least one element that has the same text
value as one element in this list and additionally contains at least one element
with a text value that is not contained in this list. |
Node |
get(double value,
NodeDataAdapter adapter)
|
Node |
get(int pos)
|
Node |
get(String value,
NodeDataAdapter adapter)
|
boolean |
isEmpty()
|
int |
size()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
list
private Vector<Node> list
AddSupportValuesEdit.LeafList
private AddSupportValuesEdit.LeafList()
add
public boolean add(Node n)
add
public void add(AddSupportValuesEdit.LeafList other)
contains
public boolean contains(Node n)
contains
public boolean contains(double value,
NodeDataAdapter adapter)
contains
public boolean contains(String value,
NodeDataAdapter adapter)
get
public Node get(int pos)
get
public Node get(String value,
NodeDataAdapter adapter)
get
public Node get(double value,
NodeDataAdapter adapter)
containsAllNames
public boolean containsAllNames(NodeDataAdapter listAdapter,
AddSupportValuesEdit.LeafList other,
NodeDataAdapter otherAdapter)
Tests if the given list contains elements with the same text values as this
list.
Note that this method does not check if this list contains more elements
than the given one.
- Parameters:
listAdapter - - the adapter to obtain a text value from the elements in
this listother - - the leaf list to be comparedotherAdapter- - the adapter to obtain a text value from the elements in
other.
- Returns:
true if the given list contains no element that is not
contained in this list
isEmpty
public boolean isEmpty()
size
public int size()
compareLists
public String compareLists(NodeDataAdapter listAdapter,
AddSupportValuesEdit.LeafList other,
NodeDataAdapter otherAdapter)
- Checks if the elements in the given lists have the same names as the elements
of this list.
- Parameters:
listAdapter - - the adapter to obtain a text value from the elements in
this listother - - the leaf list to be comparedotherAdapter- - the adapter to obtain a text value from the elements in
other.
- Returns:
- A message that describes the difference between the two lists or
null if no difference was found.
containsAnyNameAndOther
public boolean containsAnyNameAndOther(NodeDataAdapter listAdapter,
AddSupportValuesEdit.LeafList other,
NodeDataAdapter otherAdapter)
- Tests if the given list contains at least one element that has the same text
value as one element in this list and additionally contains at least one element
with a text value that is not contained in this list.
- Parameters:
listAdapter - - the adapter to obtain a text value from the elements in
this listother - - the leaf list to be comparedotherAdapter- - the adapter to obtain a text value from the elements in
other.
- Returns:
true if the condition described above is met