private static final class Collections2.OrderedPermutationCollection<E>
extends java.util.AbstractCollection<java.util.List<E>>
Modifier and Type | Field and Description |
---|---|
(package private) java.util.Comparator<? super E> |
comparator |
(package private) ImmutableList<E> |
inputList |
(package private) int |
size |
Constructor and Description |
---|
OrderedPermutationCollection(java.lang.Iterable<E> input,
java.util.Comparator<? super E> comparator) |
Modifier and Type | Method and Description |
---|---|
private static <E> int |
calculateSize(java.util.List<E> sortedInputList,
java.util.Comparator<? super E> comparator)
The number of permutations with repeated elements is calculated as follows:
For an empty list, it is 1 (base case).
|
boolean |
contains(java.lang.Object obj) |
boolean |
isEmpty() |
java.util.Iterator<java.util.List<E>> |
iterator() |
int |
size() |
java.lang.String |
toString() |
add, addAll, clear, containsAll, remove, removeAll, retainAll, toArray, toArray
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
final ImmutableList<E> inputList
final java.util.Comparator<? super E> comparator
final int size
private static <E> int calculateSize(java.util.List<E> sortedInputList, java.util.Comparator<? super E> comparator)
public int size()
public boolean isEmpty()
public java.util.Iterator<java.util.List<E>> iterator()
public boolean contains(java.lang.Object obj)
public java.lang.String toString()
toString
in class java.util.AbstractCollection<java.util.List<E>>