package ar.com.hjg.pngj; /** * Set of {@link IImageLine} elements. *

* This is actually a "virtual" set, it can be implemented in several ways; for * example *

*/ public interface IImageLineSet { /** * Asks for imageline corresponding to row n in the original image * (zero based). This can trigger side * effects in this object (eg, advance a cursor, set current row number...) * In some scenarios, this should be consider * as alias to (pseudocode) positionAtLine(n); getCurrentLine(); *

* Throws exception if not available. The caller is supposed to know what * he/she is doing **/ public IImageLine getImageLine(int n); /** * Like {@link #getImageLine(int)} but uses the raw numbering inside the * LineSet This makes little sense for a cursor * * @param n * Should normally go from 0 to {@link #size()} * @return */ public IImageLine getImageLineRawNum(int n); /** * Returns true if the set contain row n (in the original * image,zero based) currently allocated. *

* If it's a single-cursor, this should return true only if it's positioned * there. (notice that hasImageLine(n) can * return false, but getImageLine(n) can be ok) * **/ public boolean hasImageLine(int n); /** * Internal size of allocated rows This is informational, it should rarely * be important for the caller. **/ public int size(); }