Enum Class PartitionParser

java.lang.Object
java.lang.Enum<PartitionParser>
io.deephaven.engine.table.impl.locations.util.PartitionParser
All Implemented Interfaces:
Serializable, Comparable<PartitionParser>, java.lang.constant.Constable

public enum PartitionParser extends Enum<PartitionParser>
Re-usable parsers for partition values encountered as strings, e.g. when inferring/assigning partition values from elements in a path.
  • Enum Constant Details

  • Method Details

    • values

      public static PartitionParser[] 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 PartitionParser 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
    • getResultType

      public Class<? extends Comparable<?>> getResultType()
      Get the Class of the result type that will be returned by parse.
      Returns:
      The result type
    • parse

      public Comparable<?> parse(@NotNull @NotNull String stringValue)
      Parse stringValue to the expected type, boxed as an Object if primitive. Empty inputs are always parsed to null. No other pre-parsing adjustments, e.g. trim, are performed on stringValue before applying type-specific parsing logic.
      Parameters:
      stringValue - The String to parse
      Returns:
      The parsed result partition value as an Object
      Throws:
      NullPointerException - if stringValue is null
      IllegalArgumentException - if stringValue could not be parsed
    • lookup

      @Nullable public static @Nullable PartitionParser lookup(@NotNull @NotNull Class<?> dataType, @Nullable @Nullable Class<?> componentType)
      Look up the PartitionParser for dataType and componentType.
      Parameters:
      dataType - The data type Class to look up
      componentType - The component type Class to look up, or null if there is none
      Returns:
      The appropriate PartitionParser, or null for unsupported dataType or componentType values
    • lookupSupported

      @NotNull public static @NotNull PartitionParser lookupSupported(@NotNull @NotNull Class<?> dataType, @Nullable @Nullable Class<?> componentType)
      Look up the PartitionParser for dataType and componentType.
      Parameters:
      dataType - The data type Class to look up
      componentType - The component type Class to look up, or null if there is none
      Returns:
      The appropriate PartitionParser
      Throws:
      IllegalArgumentException - for unsupported dataType values
    • lookup

      @Nullable public static @Nullable PartitionParser lookup(@NotNull @NotNull Type<?> type)
      Look up the PartitionParser for type.
      Parameters:
      type - The Type to look up
      Returns:
      The appropriate PartitionParser, or null for unsupported type values
    • lookupSupported

      @NotNull public static @NotNull PartitionParser lookupSupported(@NotNull @NotNull Type<?> type)
      Look up the PartitionParser for type.
      Parameters:
      type - The Type to look up
      Returns:
      The appropriate PartitionParser, or null for unsupported type values