Package com.google.common.collect
Class CartesianList<E>
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<java.util.List<E>>
-
- com.google.common.collect.CartesianList<E>
-
- All Implemented Interfaces:
java.lang.Iterable<java.util.List<E>>
,java.util.Collection<java.util.List<E>>
,java.util.List<java.util.List<E>>
,java.util.RandomAccess
final class CartesianList<E> extends java.util.AbstractList<java.util.List<E>> implements java.util.RandomAccess
Implementation ofLists.cartesianProduct(List)
.
-
-
Field Summary
Fields Modifier and Type Field Description private ImmutableList<java.util.List<E>>
axes
private int[]
axesSizeProduct
-
Constructor Summary
Constructors Constructor Description CartesianList(ImmutableList<java.util.List<E>> axes)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
contains(java.lang.Object object)
(package private) static <E> java.util.List<java.util.List<E>>
create(java.util.List<? extends java.util.List<? extends E>> lists)
ImmutableList<E>
get(int index)
private int
getAxisIndexForProductIndex(int index, int axis)
int
indexOf(java.lang.Object o)
int
lastIndexOf(java.lang.Object o)
int
size()
-
Methods inherited from class java.util.AbstractList
add, add, addAll, clear, equals, hashCode, iterator, listIterator, listIterator, remove, removeRange, set, subList
-
Methods inherited from class java.util.AbstractCollection
addAll, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
-
-
-
-
Field Detail
-
axes
private final transient ImmutableList<java.util.List<E>> axes
-
axesSizeProduct
private final transient int[] axesSizeProduct
-
-
Constructor Detail
-
CartesianList
CartesianList(ImmutableList<java.util.List<E>> axes)
-
-
Method Detail
-
create
static <E> java.util.List<java.util.List<E>> create(java.util.List<? extends java.util.List<? extends E>> lists)
-
getAxisIndexForProductIndex
private int getAxisIndexForProductIndex(int index, int axis)
-
indexOf
public int indexOf(@CheckForNull java.lang.Object o)
-
lastIndexOf
public int lastIndexOf(@CheckForNull java.lang.Object o)
-
get
public ImmutableList<E> get(int index)
-
size
public int size()
-
-