Enum LimitFunction

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<LimitFunction>

    public enum LimitFunction
    extends java.lang.Enum<LimitFunction>
    Defines the function used to limit an optionally sorted set.
    Since:
    1.0.1
    Author:
    Paul Stoellberger
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      BottomCount
      Returns a specified number of items from the bottom of a set, optionally ordering the set first.
      BottomPercent
      Sorts a set and returns the bottom N elements whose cumulative total is at least a specified percentage.
      BottomSum
      Sorts a set and returns the bottom N elements whose cumulative total is at least a specified value.
      TopCount
      Returns a specified number of items from the top of a set, optionally ordering the set first.
      TopPercent
      Sorts a set and returns the top N elements whose cumulative total is at least a specified percentage.
      TopSum
      Sorts a set and returns the top N elements whose cumulative total is at least a specified value.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static LimitFunction valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static LimitFunction[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • TopCount

        public static final LimitFunction TopCount
        Returns a specified number of items from the top of a set, optionally ordering the set first.
      • TopPercent

        public static final LimitFunction TopPercent
        Sorts a set and returns the top N elements whose cumulative total is at least a specified percentage.
      • TopSum

        public static final LimitFunction TopSum
        Sorts a set and returns the top N elements whose cumulative total is at least a specified value.
      • BottomCount

        public static final LimitFunction BottomCount
        Returns a specified number of items from the bottom of a set, optionally ordering the set first.
      • BottomPercent

        public static final LimitFunction BottomPercent
        Sorts a set and returns the bottom N elements whose cumulative total is at least a specified percentage.
      • BottomSum

        public static final LimitFunction BottomSum
        Sorts a set and returns the bottom N elements whose cumulative total is at least a specified value.
    • Method Detail

      • values

        public static LimitFunction[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (LimitFunction c : LimitFunction.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static LimitFunction valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null