jlibs.core.graph.sequences
Class ArraySequence<E>

java.lang.Object
  extended by jlibs.core.graph.sequences.AbstractSequence<E>
      extended by jlibs.core.graph.sequences.ArraySequence<E>
All Implemented Interfaces:
Sequence<E>

public class ArraySequence<E>
extends AbstractSequence<E>

Author:
Santhosh Kumar T

Field Summary
 
Fields inherited from class jlibs.core.graph.sequences.AbstractSequence
current
 
Constructor Summary
ArraySequence(E... array)
           
ArraySequence(E[] array, int start, int end)
           
 
Method Summary
 ArraySequence<E> copy()
           
protected  E findNext()
           
 int length()
           
 void reset()
           
 
Methods inherited from class jlibs.core.graph.sequences.AbstractSequence
current, findNext, hasNext, index, next, next
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArraySequence

public ArraySequence(E... array)

ArraySequence

public ArraySequence(E[] array,
                     int start,
                     int end)
Method Detail

findNext

protected E findNext()
Specified by:
findNext in class AbstractSequence<E>

reset

public void reset()
Specified by:
reset in interface Sequence<E>
Overrides:
reset in class AbstractSequence<E>

copy

public ArraySequence<E> copy()

length

public int length()
Specified by:
length in interface Sequence<E>
Overrides:
length in class AbstractSequence<E>


Copyright © 2018. All rights reserved.