Class Bag.Counter

  • All Implemented Interfaces:
    java.io.Serializable
    Enclosing class:
    Bag<T>

    public static class Bag.Counter
    extends java.lang.Object
    implements java.io.Serializable
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      Counter()  
      Counter​(int count)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean decrement()  
      int get()  
      void increment()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Counter

        public Counter()
      • Counter

        public Counter​(int count)
    • Method Detail

      • increment

        public void increment()
      • decrement

        public boolean decrement()
      • get

        public int get()
      • toString

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