Enum Class LengthOption

java.lang.Object
java.lang.Enum<LengthOption>
org.cojen.tupl.io.LengthOption
All Implemented Interfaces:
Serializable, Comparable<LengthOption>, Constable

public enum LengthOption extends Enum<LengthOption>
Options when setting the file length.
  • Enum Constant Details

    • PREALLOCATE_NEVER

      public static final LengthOption PREALLOCATE_NEVER
      Never attempt to preallocate when the file length increases.
    • PREALLOCATE_OPTIONAL

      public static final LengthOption PREALLOCATE_OPTIONAL
      Only attempt to preallocate if it can be done quickly.
    • PREALLOCATE_ALWAYS

      public static final LengthOption PREALLOCATE_ALWAYS
      Always attempt to preallocate, even if it's expensive.
  • Method Details

    • values

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