Enum TruncateMode

java.lang.Object
java.lang.Enum<TruncateMode>
org.refcodes.mixin.TruncateMode
All Implemented Interfaces:
Serializable, Comparable<TruncateMode>, java.lang.constant.Constable

public enum TruncateMode extends Enum<TruncateMode>
The TruncateMode specifies for according algorithms on how to truncate a sequence.
  • Enum Constant Details

    • HEAD_AND_TAIL

      public static final TruncateMode HEAD_AND_TAIL
      Truncate both head and tail (left and right hand side) of a sequence.
    • TAIL

      public static final TruncateMode TAIL
      Truncate the tail (right hand side) of a sequence.
  • Method Details

    • values

      public static TruncateMode[] 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 TruncateMode valueOf(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:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • isHead

      public boolean isHead()
      Returns true in case the head is to be truncated.
      Returns:
      True in case the left hand side is to be truncated.
    • isTail

      public boolean isTail()
      Returns true in case the tail is to be truncated.
      Returns:
      True in case the right hand side is to be truncated.