|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.util.AbstractCollection | +--java.util.AbstractList | +--java.util.AbstractSequentialList | +--java.util.LinkedList | +--AffineTransformList
Linked list implementation of the List interface containing AffineTransforms. Implements all
optional list operations, but only permits AffineTransform
insertion. In addition to implementing the List interface,
the AffineTransformList class extends the uniformly named methods within LinkedList to
get, remove and insert an element at the
beginning and end of the list. These operations allow AffineTransformLists to be
used as a stack, queue, or double-ended queue (deque).
The primary purpose of the class is for the development of getTransformStep,
which returns the AffineTransform
found passing a double index. The double index transforms
into an intermidiary AffineTransform
developed from the list of AffineTransforms.
The iterators returned by the this class's iterator and listIterator methods are fail-fast: if the list is structurally modified at any time after the iterator is created, in any way except through the Iterator's own remove or add methods, the iterator will throw a ConcurrentModificationException. Thus, in the face of concurrent modification, the iterator fails quickly and cleanly, rather than risking arbitrary, non-deterministic behavior at an undetermined time in the future.
LinkedList
,
AffineTransform
,
Serialized FormField Summary |
Fields inherited from class java.util.AbstractList |
modCount |
Constructor Summary | |
AffineTransformList()
Constructs an empty list. |
|
AffineTransformList(java.util.Collection c)
Constructs a list containing the elements of the specified collection, in the order they are returned by the collection's iterator. |
Method Summary | |
boolean |
add(java.awt.geom.AffineTransform a)
Appends the given AffineTransform to the end of this list. |
void |
add(int index,
java.awt.geom.AffineTransform element)
Inserts the specified AffineTransform at the specified position in this list. |
void |
addFirst(java.awt.geom.AffineTransform a)
Inserts the given AffineTransform at the beginning of this list. |
void |
addLast(java.awt.geom.AffineTransform a)
Appends the given AffineTransform to the end of this list. |
static java.awt.geom.AffineTransform |
getTransformStep(java.awt.geom.AffineTransform a,
java.awt.geom.AffineTransform b,
double step)
Finds the appropriate AffineTransform given a double step and two AffineTrasforms. |
java.awt.geom.AffineTransform |
getTransformStep(double step)
Finds the appropriate AffineTransform given a double step. |
java.awt.geom.AffineTransform |
set(int index,
java.awt.geom.AffineTransform element)
Replaces the AffineTransform at the specified position in this list with the
specified AffineTransform . |
Methods inherited from class java.util.LinkedList |
add, add, addAll, addAll, addFirst, addLast, clear, clone, contains, get, getFirst, getLast, indexOf, lastIndexOf, listIterator, remove, remove, removeFirst, removeLast, 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 |
Constructor Detail |
public AffineTransformList()
public AffineTransformList(java.util.Collection c)
c
- the collection whose elements are to be placed into this list.Method Detail |
public boolean add(java.awt.geom.AffineTransform a)
AffineTransform
to the end of this list.
a
- the AffineTransform
to be inserted at the end of this list.
public void add(int index, java.awt.geom.AffineTransform element)
AffineTransform
at the specified position in this list.
Shifts the AffineTransform
currently at that position (if any) and any
subsequent elements to the right (adds one to their indices).
index
- index at which the specified element is to be inserted.element
- AffineTransform
to be inserted.
java.lang.IndexOutOfBoundsException
- if the specified index is out of
range (index < 0 || index > size()).public void addFirst(java.awt.geom.AffineTransform a)
AffineTransform
at the beginning of this list.
a
- the AffineTransform
to be inserted at the beginning of this list.public void addLast(java.awt.geom.AffineTransform a)
AffineTransform
to the end of this list. (Identical in
function to the add method; included only for consistency.)
a
- the AffineTransform
to be inserted at the end of this list.public java.awt.geom.AffineTransform set(int index, java.awt.geom.AffineTransform element)
AffineTransform
at the specified position in this list with the
specified AffineTransform
.
index
- index of element to replace.element
- AffineTransform
to be stored at the specified position.
AffineTransform
previously at the specified position.
java.lang.IndexOutOfBoundsException
- if the specified index is out of
range (index < 0 || index >= size()).public java.awt.geom.AffineTransform getTransformStep(double step) throws java.lang.IndexOutOfBoundsException
AffineTransform
given a double step. The double step
refers to inbetween two AffineTransform
s, defined by integer indices. The AffineTransform
returns that takes the step and finds the AffineTransform that fits at that given point
between the two integer indices.
step
- double step referring to inbetween two indices of the AffineTransformList.
AffineTransform
that represents the transform for the double step between
two AffineTransform
s.
java.lang.IndexOutOfBoundsException
- if the specified step is out of
range (step < 0 || step >= size()).public static java.awt.geom.AffineTransform getTransformStep(java.awt.geom.AffineTransform a, java.awt.geom.AffineTransform b, double step)
AffineTransform
given a double step and two AffineTrasforms. The double step
refers to a number between 1 and 0. The AffineTransform
returned takes the step and finds the AffineTransform that fits at that given point
between the two integer indices, 0 returns AffineTransform
a and 1 returns AffineTrasform
b.
a
- AffineTransform that is returned at step 0.b
- AffineTransform that is returned at step 1.step
- double step referring to inbetween two indices of the AffineTransformList.
AffineTransform
that represents the transform for the double step between
two AffineTransform
s a and b.
java.lang.IndexOutOfBoundsException
- if the specified step is out of
range (step < 0 || step >= size()).
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |