Class InstanceStateCounter

  • All Implemented Interfaces:
    java.io.Serializable

    public class InstanceStateCounter
    extends java.lang.Object
    implements java.io.Serializable
    holds a count of the time a particular instance is in any one state. not thread-safe.
    See Also:
    Serialized Form
    • Constructor Detail

      • InstanceStateCounter

        public InstanceStateCounter()
    • Method Detail

      • changeState

        public InstanceState changeState​(InstanceState newState)
        Changes current state to the new state, accumulating any time that has passed since the last state change.
        Parameters:
        newState -
        Returns:
        the previous state
      • clear

        public void clear()
        Clears all counts to 0.