gnu.crypto.util
Class Sequence
public final
class
Sequence
extends AbstractList
A monotonic sequence of integers in the finite field 232.
Constructor Summary |
| Sequence(int end)
Create a sequence of integers from 0 to end, with an increment
of 1. |
| Sequence(int start, int end)
Create a sequence of integers from start to end, with an
increment of 1. |
| Sequence(int start, int end, int span)
Create a sequence of integers from start to end, with an
increment of span. |
public Sequence(int end)
Create a sequence of integers from 0 to
end, with an increment
of 1. If
end is less than 0, then the sequence will wrap around
through all positive integers then negative integers until the end
value is reached. Naturally, this will result in an enormous object,
so don't do this.
Parameters: end The ending value.
public Sequence(int start, int end)
Create a sequence of integers from
start to
end, with an
increment of 1. If
end is less than
start, then the sequence
will wrap around until the end value is reached. Naturally, this will
result in an enormous object, so don't do this.
Parameters: start The starting value. end The ending value.
public Sequence(int start, int end, int span)
Create a sequence of integers from
start to
end, with an
increment of
span. If
end is less than
start, then
the sequence will wrap around until the end value is reached. Naturally,
this will result in an enormous object, so don't do this.
span can be negative, resulting in a decresing sequence.
If span is 0, then the sequence will contain {start,
end} if start != end, or just the singleton
start if start == end.
Parameters: start The starting value. end The ending value. span The increment value.
public Object get(int index)
public int size()
public Object[] toArray()