java.lang.Object
com.aoindustries.aoserv.cluster.analyze.Result<T>
All Implemented Interfaces:
Comparable<Result<?>>
Direct Known Subclasses:
BooleanResult, IntResult, ObjectResult

public abstract class Result<T> extends Object implements Comparable<Result<?>>
Stores an AlertLevel, a value, and a textual message.
Author:
AO Industries, Inc.
  • Method Details

    • getLabel

      public final String getLabel()
    • getValue

      public abstract T getValue()
      Gets the current value for the resource or null if unavailable.
    • getMaxValue

      public abstract T getMaxValue()
      Gets the maximum value for the resource or null if unavailable.
    • getDeviation

      public final double getDeviation()
      Gets the relative amount of devation the value is from the expected/maximum value. If the deviation is otherwise unknown or doesn't make sense for the type of resource, should be 1.0.
    • getAlertLevel

      public final AlertLevel getAlertLevel()
    • compareTo

      public final int compareTo(Result<?> other)
      Sorted by label.
      Specified by:
      compareTo in interface Comparable<T>
    • toString

      public final String toString()
      Overrides:
      toString in class Object