Package org.networkcalculus.dnc.curves
Enum Curve_ConstantPool
- java.lang.Object
-
- java.lang.Enum<Curve_ConstantPool>
-
- org.networkcalculus.dnc.curves.Curve_ConstantPool
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<Curve_ConstantPool>
,java.lang.constant.Constable
public enum Curve_ConstantPool extends java.lang.Enum<Curve_ConstantPool>
- Author:
- matyesz
-
-
Enum Constant Summary
Enum Constants Enum Constant Description INFINITE_ARRIVAL_CURVE
INFINITE_SERVICE_CURVE
ZERO_ARRIVAL_CURVE
ZERO_CURVE
ZERO_SERVICE_CURVE
-
Constructor Summary
Constructors Modifier Constructor Description private
Curve_ConstantPool()
-
Method Summary
Modifier and Type Method Description protected abstract Curve
createCurve()
<T extends Curve>
Tget()
Returns the value of the constant from the pool.private static java.lang.String
getKey()
static Curve_ConstantPool
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static Curve_ConstantPool[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
ZERO_CURVE
public static final Curve_ConstantPool ZERO_CURVE
-
ZERO_SERVICE_CURVE
public static final Curve_ConstantPool ZERO_SERVICE_CURVE
-
INFINITE_SERVICE_CURVE
public static final Curve_ConstantPool INFINITE_SERVICE_CURVE
-
ZERO_ARRIVAL_CURVE
public static final Curve_ConstantPool ZERO_ARRIVAL_CURVE
-
INFINITE_ARRIVAL_CURVE
public static final Curve_ConstantPool INFINITE_ARRIVAL_CURVE
-
-
Field Detail
-
pool
private final java.util.Map<java.lang.String,Curve> pool
-
-
Method Detail
-
values
public static Curve_ConstantPool[] values()
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Curve_ConstantPool 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 namejava.lang.NullPointerException
- if the argument is null
-
get
public <T extends Curve> T get()
Returns the value of the constant from the pool.- Returns:
- T the constant casted to type T
-
getKey
private static java.lang.String getKey()
-
createCurve
protected abstract Curve createCurve()
-
-