|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ikrs.util.ListPathAdapter<T>
public class ListPathAdapter<T>
The ListPathAdapter class is a generalized java.util.List based path implementation. Note that this implementation operates on the passed list in-place! Concurrent modifications to the list may cause unexpected bevahior.
Constructor Summary | |
---|---|
ListPathAdapter(java.util.List<T> pathList)
Create a new ListPathAdaper with the given path list (and frontOffset 0). |
|
ListPathAdapter(java.util.List<T> pathList,
int frontOffset)
Create a new ListPathAdaper with the given path list and frontOffset. |
Method Summary | |
---|---|
T |
getFirstElement()
Get the first element of this path. |
int |
getLength()
Get the length of this path. |
Path<T> |
getTrailingPath()
Get the trailing path from this path. |
static void |
main(java.lang.String[] argv)
This is for testing only. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ListPathAdapter(java.util.List<T> pathList) throws java.lang.NullPointerException
pathList
- The underlying path list (must not be null).
java.lang.NullPointerException
- If pathList is null.public ListPathAdapter(java.util.List<T> pathList, int frontOffset) throws java.lang.NullPointerException
pathList
- The underlying path list (must not be null).frontOffset
- The front offset to use. The front offset must be in bounds:
0 <= frontOffset <= pathList.size().
java.lang.NullPointerException
- If pathList is null.
java.lang.IllegalArgumentException
- If frontOffset is out of bounds: frontOffset < 0 or frontOffset > pathList.size().Method Detail |
---|
public int getLength()
getLength
in interface Path<T>
public T getFirstElement()
getFirstElement
in interface Path<T>
public Path<T> getTrailingPath()
getTrailingPath
in interface Path<T>
public java.lang.String toString()
toString
in class java.lang.Object
public static void main(java.lang.String[] argv)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |