Class ThumbnailMaker.ReadinessTracker

  • Enclosing class:
    ThumbnailMaker

    protected static final class ThumbnailMaker.ReadinessTracker
    extends java.lang.Object
    Class which keeps track of the parameters being set for the ThumbnailMaker.

    This class provides functionality to determine whether or not all the required parameters have been set or not.

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.Map<java.lang.String,​java.lang.Boolean> alreadySetMap  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected ReadinessTracker()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected boolean isReady()
      Returns whether or not the ThumbnailMaker has all its required parameter set to be able to make a thumbnail.
      protected boolean isSet​(java.lang.String parameterName)
      Returns whether the specified parameter has already been set.
      protected void set​(java.lang.String parameterName)
      Tells the ThumbnailMaker.ReadinessTracker that the given parameter has been set by the ThumbnailMaker.
      protected void unset​(java.lang.String parameterName)
      Tells the ThumbnailMaker.ReadinessTracker that the given parameter has not yet been set by the ThumbnailMaker.
      • Methods inherited from class java.lang.Object

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

      • alreadySetMap

        private final java.util.Map<java.lang.String,​java.lang.Boolean> alreadySetMap
    • Constructor Detail

      • ReadinessTracker

        protected ReadinessTracker()
    • Method Detail

      • isReady

        protected boolean isReady()
        Returns whether or not the ThumbnailMaker has all its required parameter set to be able to make a thumbnail.
        Returns:
        true if the ThumbnailMaker is ready to make thumbnails, false otherwise.
      • unset

        protected void unset​(java.lang.String parameterName)
        Tells the ThumbnailMaker.ReadinessTracker that the given parameter has not yet been set by the ThumbnailMaker.
        Parameters:
        parameterName - The parameter which has not been set.
      • set

        protected void set​(java.lang.String parameterName)
        Tells the ThumbnailMaker.ReadinessTracker that the given parameter has been set by the ThumbnailMaker.
        Parameters:
        parameterName - The parameter to be marked as being set.
      • isSet

        protected boolean isSet​(java.lang.String parameterName)
        Returns whether the specified parameter has already been set.
        Parameters:
        parameterName - The parameter to check whether it has been already set or not
        Returns:
        true if the parameter has been set, false otherwise.