Package com.igormaznitsa.meta.annotation
Enum Weight.Unit
- java.lang.Object
-
- java.lang.Enum<Weight.Unit>
-
- com.igormaznitsa.meta.annotation.Weight.Unit
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<Weight.Unit>
- Enclosing class:
- Weight
public static enum Weight.Unit extends java.lang.Enum<Weight.Unit>
Contains allowed units for execution weight. They are very subjective ones but allow to describe weight of a method in subjective units. NB! Keep in mind that the units are very subjective ones!- Since:
- 1.0
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BLACK_HOLE
A Call of the method can break the universe.EXTRAHARD
A Call like ask "Ultimate Question of Life, the Universe, and Everything".EXTRALIGHT
Lighter than light one.FLUFF
Very very extra light.HARD
Contains long loops or calls for hard methods.LIGHT
Light, for instance a getter with some condition of light logic.NORMAL
Normal weight for regular execution with conditions and short loops.VARIABLE
Variable weight, can be changed in wide interval.
-
Constructor Summary
Constructors Modifier Constructor Description private
Unit()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Weight.Unit
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static Weight.Unit[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
VARIABLE
public static final Weight.Unit VARIABLE
Variable weight, can be changed in wide interval. Synonym of undefined.- Since:
- 1.0
-
FLUFF
public static final Weight.Unit FLUFF
Very very extra light.- Since:
- 1.0
-
EXTRALIGHT
public static final Weight.Unit EXTRALIGHT
Lighter than light one. May be just a getter for a field.- Since:
- 1.0
-
LIGHT
public static final Weight.Unit LIGHT
Light, for instance a getter with some condition of light logic.- Since:
- 1.0
-
NORMAL
public static final Weight.Unit NORMAL
Normal weight for regular execution with conditions and short loops.- Since:
- 1.0
-
HARD
public static final Weight.Unit HARD
Contains long loops or calls for hard methods.- Since:
- 1.0
-
EXTRAHARD
public static final Weight.Unit EXTRAHARD
A Call like ask "Ultimate Question of Life, the Universe, and Everything".- Since:
- 1.0
-
BLACK_HOLE
public static final Weight.Unit BLACK_HOLE
A Call of the method can break the universe.- Since:
- 1.0
-
-
Method Detail
-
values
public static Weight.Unit[] 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 (Weight.Unit c : Weight.Unit.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Weight.Unit 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
-
-