Class ObjectCounter


  • public class ObjectCounter
    extends java.lang.Object
    Counts occurrences of objects.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      private static class  ObjectCounter.Counter  
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.Map counts  
    • Constructor Summary

      Constructors 
      Constructor Description
      ObjectCounter()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(java.lang.Object o)  
      int count​(java.lang.Object o)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • counts

        private java.util.Map counts
    • Constructor Detail

      • ObjectCounter

        public ObjectCounter()
    • Method Detail

      • add

        public void add​(java.lang.Object o)
      • count

        public int count​(java.lang.Object o)