01: // Copyright (c) 2001 Per M.A. Bothner and Brainfood Inc.
02: // This is free software; for terms and warranty disclaimer see ./COPYING.
03:
04: package gnu.lists;
05:
06: /** An object that contains some number of positions in a Sequence.
07: * Each position is a pair of an int and an Object. These have meaning
08: * only as interpreted by the Sequence.
09: *
10: * This interface is purely for efficiency - rather than allocating
11: * a fresh SeqPosition object for each pair, we can store more than
12: * one pair in a container.
13: */
14:
15: public interface PositionContainer {
16: /** Get the integer part of a specified position pair. */
17: public int getPositionInt(int positionNumber);
18:
19: /** Get the Object part of a specified position pair. */
20: public Object getPositionPtr(int positionNumber);
21:
22: public void setPosition(int positionNumber, int ipos, Object xpos);
23:
24: public void setSequence(int positionNumber, AbstractSequence seq);
25:
26: /** Get the number of positions pairs stored in this PositionContainer. */
27: public int countPositions();
28: }
|