Class Count

java.lang.Object
com.google.common.collect.Count
All Implemented Interfaces:
Serializable

final class Count extends Object implements Serializable
A mutable value of type int, for multisets to use in tracking counts of values.
  • Field Details

    • value

      private int value
  • Constructor Details

    • Count

      Count(int value)
  • Method Details

    • get

      public int get()
    • add

      public void add(int delta)
    • addAndGet

      public int addAndGet(int delta)
    • set

      public void set(int newValue)
    • getAndSet

      public int getAndSet(int newValue)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(@CheckForNull Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object