|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.google.common.collect.Multisets
@GwtCompatible public final class Multisets
Provides static utility methods for creating and working with Multiset instances.
| Method Summary | ||
|---|---|---|
static
|
immutableEntry(E e,
int n)
Returns an immutable multiset entry with the specified element and count. |
|
static
|
intersection(Multiset<E> multiset1,
Multiset<?> multiset2)
Returns an unmodifiable view of the intersection of two multisets. |
|
static
|
unmodifiableMultiset(Multiset<? extends E> multiset)
Returns an unmodifiable view of the specified multiset. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static <E> Multiset<E> unmodifiableMultiset(Multiset<? extends E> multiset)
UnsupportedOperationException.
The returned multiset will be serializable if the specified multiset is serializable.
multiset - the multiset for which an unmodifiable view is to be
generated
public static <E> Multiset.Entry<E> immutableEntry(@Nullable
E e,
int n)
e - the element to be associated with the returned entryn - the count to be associated with the returned entry
IllegalArgumentException - if n is negative
public static <E> Multiset<E> intersection(Multiset<E> multiset1,
Multiset<?> multiset2)
multiset1, with repeated occurrences of the same
element appearing consecutively.
Results are undefined if multiset1 and multiset2 are
based on different equivalence relations (as HashMultiset and
TreeMultiset are).
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||