|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList<VectorStep>
org.opensourcephysics.cabrillo.tracker.VectorChain
public class VectorChain
This is an ArrayList that represents a chain of vectors linked tip-to-tail.
| Field Summary |
|---|
| Fields inherited from class java.util.AbstractList |
|---|
modCount |
| Constructor Summary | |
|---|---|
protected |
VectorChain(VectorStep start)
Constructs a chain. |
|
VectorChain(VectorStep start,
VectorStep end)
Constructs a chain. |
| Method Summary | |
|---|---|
void |
add(int index,
VectorStep v)
Overrides ArrayList method. |
boolean |
add(VectorChain chain)
Adds a VectorChain to this chain. |
boolean |
add(VectorStep vector)
Ads a vector to this chain. |
boolean |
addAll(java.util.Collection<? extends VectorStep> c)
Overrides ArrayList method. |
boolean |
addAll(int index,
java.util.Collection<? extends VectorStep> c)
Overrides ArrayList method. |
VectorChain |
breakAt(VectorStep vector)
/** Attempts to break this chain in two. |
void |
clear()
Overrides ArrayList method. |
VectorStep |
getEnd()
Gets the end of the chain. |
VectorStep |
getStart()
Gets the start of the chain. |
protected boolean |
isAllowed(VectorStep vector)
Determines whether the specified vector is allowed to be added to the end hinge. |
VectorStep |
remove(int index)
Overrides ArrayList method. |
boolean |
remove(java.lang.Object obj)
Overrides ArrayList method. |
protected java.util.ArrayList<VectorStep> |
remove(VectorStep vector)
Removes vectors downstream of and including the specified vector. |
VectorStep |
removeEnd()
Removes the end of the chain. |
void |
removeRange(int from,
int to)
Overrides ArrayList method. |
boolean |
retainAll(java.util.Collection<?> c)
Overrides ArrayList method. |
VectorStep |
set(int index,
VectorStep obj)
Overrides ArrayList method. |
| Methods inherited from class java.util.ArrayList |
|---|
clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, size, toArray, toArray, trimToSize |
| Methods inherited from class java.util.AbstractList |
|---|
equals, hashCode, iterator, listIterator, listIterator, subList |
| Methods inherited from class java.util.AbstractCollection |
|---|
containsAll, removeAll, 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, iterator, listIterator, listIterator, removeAll, subList |
| Constructor Detail |
|---|
protected VectorChain(VectorStep start)
start - the start vector
public VectorChain(VectorStep start,
VectorStep end)
start - the start vectorend - the end vector| Method Detail |
|---|
public VectorStep getEnd()
public VectorStep getStart()
public VectorStep removeEnd()
public VectorChain breakAt(VectorStep vector)
vector - the vector
public void clear()
clear in interface java.util.Collection<VectorStep>clear in interface java.util.List<VectorStep>clear in class java.util.ArrayList<VectorStep>public boolean add(VectorStep vector)
add in interface java.util.Collection<VectorStep>add in interface java.util.List<VectorStep>add in class java.util.ArrayList<VectorStep>vector - the vector to add
public boolean add(VectorChain chain)
chain - the chain to add
public boolean addAll(java.util.Collection<? extends VectorStep> c)
addAll in interface java.util.Collection<VectorStep>addAll in interface java.util.List<VectorStep>addAll in class java.util.ArrayList<VectorStep>c - the collection to add
public void add(int index,
VectorStep v)
add in interface java.util.List<VectorStep>add in class java.util.ArrayList<VectorStep>index - the indexv - the vector to addpublic VectorStep remove(int index)
remove in interface java.util.List<VectorStep>remove in class java.util.ArrayList<VectorStep>index - the index
public boolean remove(java.lang.Object obj)
remove in interface java.util.Collection<VectorStep>remove in interface java.util.List<VectorStep>remove in class java.util.ArrayList<VectorStep>obj - the object to remove
public void removeRange(int from,
int to)
removeRange in class java.util.ArrayList<VectorStep>from - indexto - indexpublic boolean retainAll(java.util.Collection<?> c)
retainAll in interface java.util.Collection<VectorStep>retainAll in interface java.util.List<VectorStep>retainAll in class java.util.AbstractCollection<VectorStep>c - a collection
public boolean addAll(int index,
java.util.Collection<? extends VectorStep> c)
addAll in interface java.util.List<VectorStep>addAll in class java.util.ArrayList<VectorStep>index - the indexc - the collection to add
public VectorStep set(int index,
VectorStep obj)
set in interface java.util.List<VectorStep>set in class java.util.ArrayList<VectorStep>index - the indexobj - the object
protected boolean isAllowed(VectorStep vector)
vector - the vector
protected java.util.ArrayList<VectorStep> remove(VectorStep vector)
vector - the vector
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||