Class GoogleMultisetAdapter<E>

  • All Implemented Interfaces:
    java.lang.Iterable<E>, java.util.Collection<E>, Multiset<E>, ReadOnlyMultiset<E>

    public class GoogleMultisetAdapter<E>
    extends java.lang.Object
    implements Multiset<E>
    • Constructor Detail

      • GoogleMultisetAdapter

        public GoogleMultisetAdapter​(com.google.common.collect.Multiset<E> elements)
    • Method Detail

      • count

        public int count​(@Nullable
                         java.lang.Object o)
        Specified by:
        count in interface ReadOnlyMultiset<E>
      • add

        public int add​(E element,
                       int count)
        Specified by:
        add in interface Multiset<E>
      • remove

        public int remove​(java.lang.Object element,
                          int count)
        Specified by:
        remove in interface Multiset<E>
      • setCount

        public int setCount​(E element,
                            int count)
        Specified by:
        setCount in interface Multiset<E>
      • setCount

        public boolean setCount​(E element,
                                int count,
                                int var3)
        Specified by:
        setCount in interface Multiset<E>
      • size

        public int size()
        Specified by:
        size in interface java.util.Collection<E>
        Specified by:
        size in interface ReadOnlyMultiset<E>
      • isEmpty

        public boolean isEmpty()
        Specified by:
        isEmpty in interface java.util.Collection<E>
        Specified by:
        isEmpty in interface ReadOnlyMultiset<E>
      • contains

        public boolean contains​(java.lang.Object o)
        Specified by:
        contains in interface java.util.Collection<E>
        Specified by:
        contains in interface ReadOnlyMultiset<E>
      • iterator

        public java.util.Iterator<E> iterator()
        Specified by:
        iterator in interface java.util.Collection<E>
        Specified by:
        iterator in interface java.lang.Iterable<E>
      • toArray

        public java.lang.Object[] toArray()
        Specified by:
        toArray in interface java.util.Collection<E>
        Specified by:
        toArray in interface ReadOnlyMultiset<E>
      • toArray

        public <T> T[] toArray​(T[] ts)
        Specified by:
        toArray in interface java.util.Collection<E>
        Specified by:
        toArray in interface ReadOnlyMultiset<E>
      • add

        public boolean add​(E element)
        Specified by:
        add in interface java.util.Collection<E>
        Specified by:
        add in interface Multiset<E>
      • remove

        public boolean remove​(java.lang.Object element)
        Specified by:
        remove in interface java.util.Collection<E>
        Specified by:
        remove in interface Multiset<E>
      • containsAll

        public boolean containsAll​(java.util.Collection<?> elements)
        Specified by:
        containsAll in interface java.util.Collection<E>
        Specified by:
        containsAll in interface ReadOnlyMultiset<E>
      • spliterator

        public java.util.Spliterator<E> spliterator()
        Specified by:
        spliterator in interface java.util.Collection<E>
        Specified by:
        spliterator in interface java.lang.Iterable<E>
      • stream

        public java.util.stream.Stream<E> stream()
        Specified by:
        stream in interface java.util.Collection<E>
      • parallelStream

        public java.util.stream.Stream<E> parallelStream()
        Specified by:
        parallelStream in interface java.util.Collection<E>
      • addAll

        public boolean addAll​(java.util.Collection<? extends E> elements)
        Specified by:
        addAll in interface java.util.Collection<E>
      • removeAll

        public boolean removeAll​(java.util.Collection<?> elements)
        Specified by:
        removeAll in interface java.util.Collection<E>
        Specified by:
        removeAll in interface Multiset<E>
      • retainAll

        public boolean retainAll​(java.util.Collection<?> elements)
        Specified by:
        retainAll in interface java.util.Collection<E>
        Specified by:
        retainAll in interface Multiset<E>
      • clear

        public void clear()
        Specified by:
        clear in interface java.util.Collection<E>
      • equals

        public boolean equals​(java.lang.Object o)
        Specified by:
        equals in interface java.util.Collection<E>
        Specified by:
        equals in interface ReadOnlyMultiset<E>
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface java.util.Collection<E>
        Specified by:
        hashCode in interface ReadOnlyMultiset<E>
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Specified by:
        toString in interface ReadOnlyMultiset<E>
        Overrides:
        toString in class java.lang.Object