Enum NameComparator

java.lang.Object
java.lang.Enum<NameComparator>
org.assertj.db.util.NameComparator
All Implemented Interfaces:
Serializable, Comparable<NameComparator>

public enum NameComparator extends Enum<NameComparator>
Comparator for the names.
Since:
1.1.0
Author:
Régis Pouiller
  • Enum Constant Details

    • INSTANCE

      public static final NameComparator INSTANCE
      The singleton
  • Method Details

    • values

      public static NameComparator[] 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 NameComparator 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
    • contains

      public boolean contains(List<String> namesList, String name, CaseComparison comparison)
      Returns if namesList contains name by comparing using comparison.
      Parameters:
      namesList - List of names which can contain the name.
      name - The name to search.
      comparison - Case comparison to compare the name.
      Returns:
      The result.
    • indexOf

      public int indexOf(List<String> namesList, String name, CaseComparison comparison)
      Returns the index of namein namesList by comparing using comparison.
      Parameters:
      namesList - List of names which can contain the name.
      name - The name to search.
      comparison - Case comparison to compare the name.
      Returns:
      The result.