Class SimilarityCharacterInput

java.lang.Object
org.apache.commons.text.similarity.SimilarityCharacterInput
All Implemented Interfaces:
SimilarityInput<Character>

final class SimilarityCharacterInput extends Object implements SimilarityInput<Character>
Scores the similarity between two CharSequences.
  • Field Details

  • Constructor Details

    • SimilarityCharacterInput

      SimilarityCharacterInput(CharSequence cs)
  • Method Details

    • at

      public Character at(int index)
      Description copied from interface: SimilarityInput
      Gets the element in the input at the given 0-based index.
      Specified by:
      at in interface SimilarityInput<Character>
      Parameters:
      index - a 0-based index.
      Returns:
      the element in the input at the given 0-based index.
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • length

      public int length()
      Description copied from interface: SimilarityInput
      Gets the length of the input.
      Specified by:
      length in interface SimilarityInput<Character>
      Returns:
      the length of the input.
    • toString

      public String toString()
      Overrides:
      toString in class Object