Package net.sf.basedb.core
Enum Class Formula.AverageMethod
- All Implemented Interfaces:
Serializable
,Comparable<Formula.AverageMethod>
,Constable
- Enclosing class:
- Formula
The average method used for the values of this formula. The average
is only useful with a
Formula.Type.COLUMN_EXPRESSION
.- Version:
- 2.4
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Field Summary
Modifier and TypeFieldDescriptionprivate final String
private final int
private static final Map<Integer,
Formula.AverageMethod> Maps the integer that is stored in the database. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Formula.AverageMethod
fromValue
(int value) Get theFormula.AverageMethod
object when you know the integer code.abstract Expression
Given an expression, create an expression that takes the correct average of it.int
getValue()
Get the integer value that is used when storing aFormula.AverageMethod
in the database.toString()
static Formula.AverageMethod
Returns the enum constant of this class with the specified name.static Formula.AverageMethod[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NONE
-
GEOMETRIC_MEAN
-
ARITHMETIC_MEAN
-
MIN
-
MAX
-
QUADRATIC_MEAN
-
-
Field Details
-
valueMapping
Maps the integer that is stored in the database. -
value
private final int value -
displayValue
-
-
Constructor Details
-
AverageMethod
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
fromValue
Get theFormula.AverageMethod
object when you know the integer code.- Parameters:
value
- The integer value.- Returns:
- The AverageMethod object or null if the value is unknown
-
getAverageExpression
Given an expression, create an expression that takes the correct average of it.- Parameters:
e
- The expression, null is not allowed- Returns:
- The average expression, or null if it is not possible to create an average expression
-
getValue
public int getValue()Get the integer value that is used when storing aFormula.AverageMethod
in the database.- Returns:
- The integer value of this type
-
toString
- Overrides:
toString
in classEnum<Formula.AverageMethod>
-