Class IndexImage.Counter

  • Enclosing class:
    IndexImage

    private static class IndexImage.Counter
    extends java.lang.Object
    Used to track a color and the number of pixels of that colors
    • Field Summary

      Fields 
      Modifier and Type Field Description
      int count
      Field count
      int val
      Field val
    • Constructor Summary

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

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

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

      • val

        public int val
        Field val
      • count

        public int count
        Field count
    • Constructor Detail

      • Counter

        public Counter​(int val)
        Constructor Counter
        Parameters:
        val - the initial value
    • Method Detail

      • add

        public boolean add​(int val)
        Method add
        Parameters:
        val - the new value
        Returns:
        true if the value was added, otherwise false