package org.matheclipse.core.eval.util;
/**
* Interface for sequence specifications.
*
* A sequence in the interval of integer numbers:
* [getStart(), getStart()+getStep(), getStart()+2*getStep(), ..., getEnd()]
*
*/
public interface ISequence {
/**
* Get the end index for this sequence
*
* @return the endOffset of this sequence + 1;
*/
public abstract int getEnd();
/**
* Get the generated sequence of indices for this ISequence. Especially useful
* for unit tests to check the sequence implementation.
*
* @return [getStart(), getStart()+getStep(), getStart()+2*getStep(), ..., getEnd()]
*/
public abstract int[] getIndices();
/**
* Get the start index for this sequence
*
* @return the start offset of this sequence;
*/
public abstract int getStart();
/**
* The step for calculating the next index in the sequence.
*
* @return the step size of this sequence;
*/
public abstract int getStep();
/**
* Sets the list size of the current used list in the generics library.
* Sometimes this setting is used by special sequence implementations.
*
* @param size
*/
public abstract void setListSize(int size);
}
Ads help maintain this website.