Class NodeList<B extends Bounded>
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<E>
-
- java.util.ArrayList<B>
-
- org.jungrapht.visualization.spatial.rtree.NodeList<B>
-
- All Implemented Interfaces:
Serializable,Cloneable,Iterable<B>,Collection<B>,List<B>,RandomAccess,Bounded,BoundedList<B>
public class NodeList<B extends Bounded> extends ArrayList<B> implements BoundedList<B>, Bounded
A list of elements that are Bounded by a Rectangle2D The list is also Bounded by the combined union of its elements- Author:
- Tom Nelson
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class java.util.AbstractList
modCount
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(int index, B element)booleanadd(B n)booleanaddAll(int index, Collection<? extends B> c)booleanaddAll(Collection<? extends B> c)voidclear()Rectangle2DgetBounds()return the Rectangle of the bounding boxvoidrecalculateBounds()iterate over all children and update the bounds Called after removing from the collectionBremove(int index)booleanremove(Object o)booleanremoveAll(Collection<?> c)protected voidremoveRange(int fromIndex, int toIndex)booleanretainAll(Collection<?> c)-
Methods inherited from class java.util.ArrayList
clone, contains, ensureCapacity, equals, forEach, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, removeIf, replaceAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
-
Methods inherited from class java.util.AbstractCollection
containsAll, toString
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Methods inherited from interface java.util.List
contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, replaceAll, set, size, sort, spliterator, subList, toArray, toArray
-
-
-
-
Constructor Detail
-
NodeList
public NodeList()
-
NodeList
public NodeList(int initialCapacity)
-
NodeList
public NodeList(Collection<B> list)
-
NodeList
public NodeList(B... nodes)
-
-
Method Detail
-
add
public boolean add(B n)
-
add
public void add(int index, B element)
-
remove
public B remove(int index)
-
remove
public boolean remove(Object o)
-
clear
public void clear()
-
addAll
public boolean addAll(Collection<? extends B> c)
-
addAll
public boolean addAll(int index, Collection<? extends B> c)
-
removeRange
protected void removeRange(int fromIndex, int toIndex)- Overrides:
removeRangein classArrayList<B extends Bounded>
-
removeAll
public boolean removeAll(Collection<?> c)
-
retainAll
public boolean retainAll(Collection<?> c)
-
getBounds
public Rectangle2D getBounds()
Description copied from interface:Boundedreturn the Rectangle of the bounding box
-
recalculateBounds
public void recalculateBounds()
iterate over all children and update the bounds Called after removing from the collection- Specified by:
recalculateBoundsin interfaceBoundedList<B extends Bounded>
-
-