net.aerith.misao.util
Class PositionList

java.lang.Object
  |
  +--java.util.AbstractCollection
        |
        +--java.util.AbstractList
              |
              +--java.util.Vector
                    |
                    +--net.aerith.misao.util.PositionList
Direct Known Subclasses:
StarPositionList

public class PositionList
extends java.util.Vector

The PositionList represents a list of Position.

See Also:
Serialized Form

Fields inherited from class java.util.Vector
capacityIncrement, elementCount, elementData, serialVersionUID
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
PositionList()
          Constructs an empty PositionList.
PositionList(java.util.Vector original_list)
          Copies the specified PositionList and constructs a new PositionList.
 
Method Summary
 Graph createMinimumGlobalTree()
          Creates the minimum global tree from the list of Position.
 void map(MapFunction mf)
          Maps the (x,y) of all elements based on the specified map function.
 void shift(Position position)
          Shifts the (x,y) of all elements by adding the specified Position.
 
Methods inherited from class java.util.Vector
add, add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, ensureCapacityHelper, equals, firstElement, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeRange, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, toString, trimToSize
 
Methods inherited from class java.util.AbstractList
iterator, listIterator, listIterator
 
Methods inherited from class java.lang.Object
, finalize, getClass, notify, notifyAll, registerNatives, wait, wait, wait
 

Constructor Detail

PositionList

public PositionList()
Constructs an empty PositionList.

PositionList

public PositionList(java.util.Vector original_list)
Copies the specified PositionList and constructs a new PositionList.
Parameters:
original_list - the original_list to copy.
Method Detail

shift

public void shift(Position position)
Shifts the (x,y) of all elements by adding the specified Position.
Parameters:
position - the value to shift.

map

public void map(MapFunction mf)
Maps the (x,y) of all elements based on the specified map function.
Parameters:
mf - the map function.

createMinimumGlobalTree

public Graph createMinimumGlobalTree()
Creates the minimum global tree from the list of Position.
Returns:
the minimum global tree.