Enum Class BigDogGrowth

java.lang.Object
java.lang.Enum<BigDogGrowth>
org.ddogleg.struct.BigDogGrowth
All Implemented Interfaces:
Serializable, Comparable<BigDogGrowth>, java.lang.constant.Constable

public enum BigDogGrowth extends Enum<BigDogGrowth>
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.
  • Enum Constant Details

    • FIXED

      public static final BigDogGrowth FIXED
      Blocks always have a fixed size.
    • GROW_FIRST

      public static final BigDogGrowth 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

      public static final BigDogGrowth 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

      public static BigDogGrowth[] 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

      public static BigDogGrowth valueOf(String name)
      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 name
      NullPointerException - if the argument is null