|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.tensegrity.graph.model.AbstractEdgeList
com.tensegrity.graph.model.DirectedMultiEdgeList
Special set that eliminates directed multiedges. If you add an edge all equivalent future adds of the same edge are eliminated. The whole concept is to eliminate multi edges for iterators so that graph algorithms still work and don't have to deal with multiedges (which can make some graph algorithms a lot more complicated to implemented).
| Constructor Summary | |
DirectedMultiEdgeList()
Constructs an empty edgeset. |
|
DirectedMultiEdgeList(int initial_capacity)
Constructs an empty edgeset with the given initial capacity. |
|
| Method Summary | |
boolean |
add(Edge edge)
Adds an edge to the set. |
void |
add(int index,
java.lang.Object element)
Operation is forbidden by contract and will throw a DynamicException if it is invoked. |
boolean |
add(java.lang.Object o)
Operation is forbidden by contract and will throw a DynamicException if it is invoked. |
boolean |
addAll(java.util.Collection c)
Adds all the elements from the collection c to this collection. |
boolean |
addAll(int index,
java.util.Collection c)
Operation is forbidden by contract and will throw a DynamicException if it is invoked. |
void |
clear()
|
boolean |
contains(java.lang.Object o)
Returns true if this collection containts the given object. |
boolean |
containsAll(java.util.Collection c)
Operation is forbidden by contract and will throw a DynamicException if it is invoked. |
java.lang.Object |
get(int index)
Operation is forbidden by contract and will throw a DynamicException if it is invoked. |
int |
indexOf(java.lang.Object o)
Operation is forbidden by contract and will throw a DynamicException if it is invoked. |
boolean |
isEmpty()
Returns true iff this collection is empty. |
java.util.Iterator |
iterator()
Returns an iterator for this collection. |
int |
lastIndexOf(java.lang.Object o)
Operation is forbidden by contract and will throw a DynamicException if it is invoked. |
java.util.ListIterator |
listIterator()
Operation is forbidden by contract and will throw a DynamicException if it is invoked. |
java.util.ListIterator |
listIterator(int index)
Operation is forbidden by contract and will throw a DynamicException if it is invoked. |
java.lang.Object |
remove(int index)
Operation is forbidden by contract and will throw a DynamicException if it is invoked. |
boolean |
remove(java.lang.Object o)
Removes the given object from this collection. |
boolean |
removeAll(java.util.Collection c)
Operation is forbidden by contract and will throw a DynamicException if it is invoked. |
boolean |
retainAll(java.util.Collection c)
Operation is forbidden by contract and will throw a DynamicException if it is invoked. |
java.lang.Object |
set(int index,
java.lang.Object element)
Operation is forbidden by contract and will throw a DynamicException if it is invoked. |
int |
size()
Returns the number of elements currently stored in this collection. |
java.util.List |
subList(int fromIndex,
int toIndex)
Operation is forbidden by contract and will throw a DynamicException if it is invoked. |
java.lang.Object[] |
toArray()
Operation is forbidden by contract and will throw a DynamicException if it is invoked. |
java.lang.Object[] |
toArray(java.lang.Object[] a)
Operation is forbidden by contract and will throw a DynamicException if it is invoked. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.util.List |
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, size, subList, toArray, toArray |
| Methods inherited from interface java.util.Set |
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, remove, removeAll, retainAll, size, toArray, toArray |
| Constructor Detail |
public DirectedMultiEdgeList()
public DirectedMultiEdgeList(int initial_capacity)
initial_capacity - the initial capacity of the set.| Method Detail |
public boolean add(Edge edge)
com.tensegrity.graph.model.AbstractEdgeList
edge - the edge to add.
public java.util.Iterator iterator()
com.tensegrity.graph.model.AbstractEdgeList
iterator in interface java.util.Listpublic int size()
size in interface java.util.Listpublic boolean isEmpty()
isEmpty in interface java.util.Listpublic boolean contains(java.lang.Object o)
contains in interface java.util.Listo - the object to check for.
public boolean remove(java.lang.Object o)
remove in interface java.util.Listo - the object to remove from this collection.
public boolean addAll(java.util.Collection c)
addAll in interface java.util.Listc - the collection whose elements are to be added to this
collection.
public void clear()
clear in interface java.util.Listpublic java.lang.Object[] toArray()
toArray in interface java.util.Listpublic java.lang.Object[] toArray(java.lang.Object[] a)
toArray in interface java.util.Listpublic boolean add(java.lang.Object o)
add in interface java.util.Listpublic boolean containsAll(java.util.Collection c)
containsAll in interface java.util.List
public boolean addAll(int index,
java.util.Collection c)
addAll in interface java.util.Listpublic boolean removeAll(java.util.Collection c)
removeAll in interface java.util.Listpublic boolean retainAll(java.util.Collection c)
retainAll in interface java.util.Listpublic java.lang.Object get(int index)
get in interface java.util.List
public java.lang.Object set(int index,
java.lang.Object element)
set in interface java.util.List
public void add(int index,
java.lang.Object element)
add in interface java.util.Listpublic java.lang.Object remove(int index)
remove in interface java.util.Listpublic int indexOf(java.lang.Object o)
indexOf in interface java.util.Listpublic int lastIndexOf(java.lang.Object o)
lastIndexOf in interface java.util.Listpublic java.util.ListIterator listIterator()
listIterator in interface java.util.Listpublic java.util.ListIterator listIterator(int index)
listIterator in interface java.util.List
public java.util.List subList(int fromIndex,
int toIndex)
subList in interface java.util.List
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||