Package org.ddogleg.struct
Enum Class BigDogGrowth
- All Implemented Interfaces:
Serializable
,Comparable<BigDogGrowth>
,java.lang.constant.Constable
Specifies which strategy is used to select internal array size when adding new blocks. If a fixed sized
block is always used this can be memory inefficient, but is faster as array creation and copy can be avoided.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionBlocks always have a fixed size.Every new block will start out as small as possible.The first block will grow as needed but all blocks later on are fixed. -
Method Summary
Modifier and TypeMethodDescriptionstatic BigDogGrowth
Returns the enum constant of this class with the specified name.static BigDogGrowth[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
FIXED
Blocks always have a fixed size. -
GROW_FIRST
The first block will grow as needed but all blocks later on are fixed. The idea being that initially a block can be much bigger than needed initially, but after the first block the amount of memory wasted is relatively small. -
GROW
Every new block will start out as small as possible. Most memory efficient approach but will be wasteful as smaller arrays will be continuously created and copied as the array grows.
-
-
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
-