Package com.mastfrog.graph
Class IntPath
- java.lang.Object
-
- com.mastfrog.graph.IntPath
-
- All Implemented Interfaces:
Comparable<IntPath>,Iterable<Integer>
public final class IntPath extends Object implements Comparable<IntPath>, Iterable<Integer>
A path through a graph.- Author:
- Tim Boudreau
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description IntPathaddAll(int... values)static booleanarraysEquals(int[] a, int aFromIndex, int aToIndex, int[] b, int bFromIndex, int bToIndex)IntPathchildPath()intcompareTo(IntPath o)booleancontains(int val)booleancontains(IntPath path)intend()booleanequals(Object o)intfirst()intget(int index)inthashCode()intindexOf(int val)booleanisEmpty()int[]items()voiditerate(IntConsumer cons)Iterator<Integer>iterator()intlast()IntPathparentPath()IntPathreversed()intsize()intstart()<T> ObjectPath<T>toObjectPath(IndexedResolvable<T> indexed)StringtoString()-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Method Detail
-
first
public int first()
-
last
public int last()
-
addAll
public IntPath addAll(int... values)
-
childPath
public IntPath childPath()
-
parentPath
public IntPath parentPath()
-
reversed
public IntPath reversed()
-
start
public int start()
-
end
public int end()
-
contains
public boolean contains(IntPath path)
-
arraysEquals
public static boolean arraysEquals(int[] a, int aFromIndex, int aToIndex, int[] b, int bFromIndex, int bToIndex)
-
indexOf
public int indexOf(int val)
-
contains
public boolean contains(int val)
-
isEmpty
public boolean isEmpty()
-
size
public int size()
-
get
public int get(int index)
-
items
public int[] items()
-
iterate
public void iterate(IntConsumer cons)
-
toObjectPath
public <T> ObjectPath<T> toObjectPath(IndexedResolvable<T> indexed)
-
compareTo
public int compareTo(IntPath o)
- Specified by:
compareToin interfaceComparable<IntPath>
-
-