Class AbstractFlapListener

    • Field Detail

      • defaultFlapInterval

        private int defaultFlapInterval
        The default flap interval.
      • defaultFlapStartThreshold

        private float defaultFlapStartThreshold
        The default flap start threshold.
      • defaultFlapStopThreshold

        private float defaultFlapStopThreshold
        The default flap stop threshold.
      • defaultFlapLowWeight

        private float defaultFlapLowWeight
        The default flap low weight.
      • defaultFlapHighWeight

        private float defaultFlapHighWeight
        The default flap high weight.
    • Constructor Detail

      • AbstractFlapListener

        public AbstractFlapListener()
    • Method Detail

      • flappingStarted

        protected abstract void flappingStarted​(StatsCollectionEvent sce)
        Flapping started.
        Parameters:
        sce - the sce
      • aboveThresholdFlappingStopped

        protected abstract void aboveThresholdFlappingStopped​(StatsCollectionEvent sce)
        Above threshold flapping stopped.
        Parameters:
        sce - the sce
      • belowThresholdFlappingStopped

        protected abstract void belowThresholdFlappingStopped​(StatsCollectionEvent sce)
        Below threshold flapping stopped.
        Parameters:
        sce - the sce
      • aboveThresholdNotFlapping

        protected abstract void aboveThresholdNotFlapping​(StatsCollectionEvent sce)
        Above threshold not flapping.
        Parameters:
        sce - the sce
      • belowThresholdNotFlapping

        protected abstract void belowThresholdNotFlapping​(StatsCollectionEvent sce)
        Below threshold not flapping.
        Parameters:
        sce - the sce
      • statsCollected

        protected void statsCollected​(StatsCollectionEvent sce,
                                      boolean crossedThreshold,
                                      boolean above)
        Stats collected.
        Parameters:
        sce - the sce
        crossedThreshold - the crossed threshold
        above - the above
      • checkFlappingStateChanged

        protected boolean checkFlappingStateChanged​(String name,
                                                    boolean crossedThreshold)
        Check flapping state changed.
        Parameters:
        name - the name
        crossedThreshold - the crossed threshold
        Returns:
        true, if successful
      • calculateStateTransitionPercentage

        protected float calculateStateTransitionPercentage​(String name,
                                                           boolean flapping)
        Calculate state transition percentage.
        Parameters:
        name - the name
        flapping - the flapping
        Returns:
        the float
      • addFlap

        protected void addFlap​(String name,
                               boolean flap)
        Adds the flap.
        Parameters:
        name - the name
        flap - the flap
      • getFlappingState

        protected boolean getFlappingState​(String name)
        Gets the flapping state.
        Parameters:
        name - the name
        Returns:
        the flapping state
      • setFlappingState

        protected void setFlappingState​(String name,
                                        boolean flapping)
        Sets the flapping state.
        Parameters:
        name - the name
        flapping - the flapping
      • getFlaps

        protected LinkedList<Boolean> getFlaps​(String name)
        Gets the flaps.
        Parameters:
        name - the name
        Returns:
        the flaps
      • getFlapInterval

        protected int getFlapInterval​(String name)
        Gets the flap interval.
        Parameters:
        name - the name
        Returns:
        the flap interval
      • getFlapStartThreshold

        protected float getFlapStartThreshold​(String name)
        Gets the flap start threshold.
        Parameters:
        name - the name
        Returns:
        the flap start threshold
      • getFlapStopThreshold

        protected float getFlapStopThreshold​(String name)
        Gets the flap stop threshold.
        Parameters:
        name - the name
        Returns:
        the flap stop threshold
      • getFlapLowWeight

        protected float getFlapLowWeight​(String name)
        Gets the flap low weight.
        Parameters:
        name - the name
        Returns:
        the flap low weight
      • getFlapHighWeight

        protected float getFlapHighWeight​(String name)
        Gets the flap high weight.
        Parameters:
        name - the name
        Returns:
        the flap high weight
      • getDefaultFlapInterval

        public int getDefaultFlapInterval()
        Gets the default flap interval.
        Returns:
        the default flap interval
      • setDefaultFlapInterval

        public void setDefaultFlapInterval​(int defaultFlapInterval)
        Sets the default flap interval.
        Parameters:
        defaultFlapInterval - the new default flap interval
      • getDefaultFlapStartThreshold

        public float getDefaultFlapStartThreshold()
        Gets the default flap start threshold.
        Returns:
        the default flap start threshold
      • setDefaultFlapStartThreshold

        public void setDefaultFlapStartThreshold​(float defaultFlapStartThreshold)
        Sets the default flap start threshold.
        Parameters:
        defaultFlapStartThreshold - the new default flap start threshold
      • getDefaultFlapStopThreshold

        public float getDefaultFlapStopThreshold()
        Gets the default flap stop threshold.
        Returns:
        the default flap stop threshold
      • setDefaultFlapStopThreshold

        public void setDefaultFlapStopThreshold​(float defaultFlapStopThreshold)
        Sets the default flap stop threshold.
        Parameters:
        defaultFlapStopThreshold - the new default flap stop threshold
      • getDefaultFlapLowWeight

        public float getDefaultFlapLowWeight()
        Gets the default flap low weight.
        Returns:
        the default flap low weight
      • setDefaultFlapLowWeight

        public void setDefaultFlapLowWeight​(float defaultFlapLowWeight)
        Sets the default flap low weight.
        Parameters:
        defaultFlapLowWeight - the new default flap low weight
      • getDefaultFlapHighWeight

        public float getDefaultFlapHighWeight()
        Gets the default flap high weight.
        Returns:
        the default flap high weight
      • setDefaultFlapHighWeight

        public void setDefaultFlapHighWeight​(float defaultFlapHighWeight)
        Sets the default flap high weight.
        Parameters:
        defaultFlapHighWeight - the new default flap high weight