gnu.crypto.util
Class Sequence
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList
gnu.crypto.util.Sequence
- All Implemented Interfaces:
- Iterable, Collection, List
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. |
Methods inherited from class java.util.AbstractList |
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subList |
Sequence
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.
Sequence
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.
Sequence
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.
get
public Object get(int index)
- Specified by:
get
in interface List
- Specified by:
get
in class AbstractList
size
public int size()
- Specified by:
size
in interface Collection
- Specified by:
size
in interface List
- Specified by:
size
in class AbstractCollection
toArray
public Object[] toArray()
- Specified by:
toArray
in interface Collection
- Specified by:
toArray
in interface List
- Overrides:
toArray
in class AbstractCollection
Copyright © 2001, 2002, 2003
Free Software Foundation,
Inc. All Rights Reserved.