net.grelf.grip
Class ConnectionList

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.AbstractSequentialList<E>
              extended by java.util.LinkedList<Connection>
                  extended by net.grelf.grip.ConnectionList
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<Connection>, java.util.Collection<Connection>, java.util.Deque<Connection>, java.util.List<Connection>, java.util.Queue<Connection>

public class ConnectionList
extends java.util.LinkedList<Connection>

Holds a list of Connection objects sorted in ascending order of polar angle. The method insert () has been added to ensure that objects are inserted into the list in that required order, so it does not have to be sorted as a separate step.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
ConnectionList()
           
 
Method Summary
 boolean insert(Connection connection)
          Insert the Connection object at the right place so the list is always in ascending order of polar angle (connection.vector.theta).
 
Methods inherited from class java.util.LinkedList
add, add, addAll, addAll, addFirst, addLast, clear, clone, contains, descendingIterator, element, get, getFirst, getLast, indexOf, lastIndexOf, listIterator, offer, offerFirst, offerLast, peek, peekFirst, peekLast, poll, pollFirst, pollLast, pop, push, remove, remove, remove, removeFirst, removeFirstOccurrence, removeLast, removeLastOccurrence, set, size, toArray, toArray
 
Methods inherited from class java.util.AbstractSequentialList
iterator
 
Methods inherited from class java.util.AbstractList
equals, hashCode, listIterator, removeRange, subList
 
Methods inherited from class java.util.AbstractCollection
containsAll, isEmpty, removeAll, retainAll, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
containsAll, equals, hashCode, isEmpty, iterator, listIterator, removeAll, retainAll, subList
 
Methods inherited from interface java.util.Deque
iterator
 

Constructor Detail

ConnectionList

public ConnectionList()
Method Detail

insert

public boolean insert(Connection connection)
Insert the Connection object at the right place so the list is always in ascending order of polar angle (connection.vector.theta).