Enum Class ColumnNameLegalizer

java.lang.Object
java.lang.Enum<ColumnNameLegalizer>
io.deephaven.csv.ColumnNameLegalizer
All Implemented Interfaces:
Serializable, Comparable<ColumnNameLegalizer>, java.lang.constant.Constable, Function<String[],String[]>, Predicate<String>

public enum ColumnNameLegalizer extends Enum<ColumnNameLegalizer> implements Function<String[],String[]>, Predicate<String>
A CsvSpecs.Builder.headerLegalizer(Function) that replaces '-' and ' ' with '_'. Also implements CsvSpecs.Builder.headerValidator(Predicate).
  • Enum Constant Details

  • Method Details

    • values

      public static ColumnNameLegalizer[] 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 ColumnNameLegalizer 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
    • apply

      public String[] apply(String[] columnNames)
      Specified by:
      apply in interface Function<String[],String[]>
    • test

      public boolean test(String columnName)
      Specified by:
      test in interface Predicate<String>