public interface Permutation<E>
Modifier and Type | Method and Description |
---|---|
int |
fromIndex(int toIndex)
Given an index on the resulting list, it gives you the index of that element on the original list.
|
java.util.List<E> |
fromList()
Returns an unmodifiable view to the original element list.
|
int |
fromSize()
Length of the original element list.
|
boolean |
isKept(int fromIndex)
Given an index of the original list, return whether this index is found at any position of the permuted list.
|
boolean |
isNonPermuted()
Checks whether this is a trivial permutation where the resulting element list is the same as original.
|
boolean |
isPartial()
Checks whether this permutation is a partial one of the original list.
|
int |
toIndex(int fromIndex)
Given an index on the original list, returns the position of tha element in the resulting list.
|
java.util.List<E> |
toList()
Returns an unmodifiable view to the original element list.
|
int |
toSize()
Length of the resulting element list.
|
boolean isPartial()
A partial permutation is one in that not all original elements take part in.
true
iff this is a partial permutation.boolean isNonPermuted()
true
iff the resulting element list is the same as the original.int toIndex(int fromIndex)
fromIndex
- the query original element index.toSize()
- 1.java.lang.IllegalArgumentException
- if fromIndex
is not a valid index within the original list.int fromIndex(int toIndex)
toIndex
- the query resulting list index.fromSize()
- 1.java.lang.IllegalArgumentException
- if toIndex
is not a valid index, i.e. in [0,toSize()
-1).boolean isKept(int fromIndex)
fromIndex
- int fromSize()
int toSize()
java.util.List<E> fromList()
null
.java.util.List<E> toList()
null
.