Class Count

  • All Implemented Interfaces:
    java.io.Serializable

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

      Fields 
      Modifier and Type Field Description
      private int value  
    • Constructor Summary

      Constructors 
      Constructor Description
      Count​(int value)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(int delta)  
      int addAndGet​(int delta)  
      boolean equals​(java.lang.Object obj)  
      int get()  
      int getAndSet​(int newValue)  
      int hashCode()  
      void set​(int newValue)  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • value

        private int value
    • Constructor Detail

      • Count

        Count​(int value)
    • Method Detail

      • 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 java.lang.Object
      • equals

        public boolean equals​(@CheckForNull
                              java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object