Class LevenshteinResults


  • public class LevenshteinResults
    extends java.lang.Object
    Container class to store Levenshtein distance between two character sequences.

    Stores the count of insert, deletion and substitute operations needed to change one character sequence into another.

    This class is immutable.

    Since:
    1.0
    • Constructor Summary

      Constructors 
      Constructor Description
      LevenshteinResults​(java.lang.Integer distance, java.lang.Integer insertCount, java.lang.Integer deleteCount, java.lang.Integer substituteCount)
      Create the results for a detailed Levenshtein distance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)  
      java.lang.Integer getDeleteCount()
      Get the number of character deletion needed to change one character sequence to other.
      java.lang.Integer getDistance()
      Get the distance between two character sequences.
      java.lang.Integer getInsertCount()
      Get the number of insertion needed to change one character sequence into another.
      java.lang.Integer getSubstituteCount()
      Get the number of character substitution needed to change one character sequence into another.
      int hashCode()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • LevenshteinResults

        public LevenshteinResults​(java.lang.Integer distance,
                                  java.lang.Integer insertCount,
                                  java.lang.Integer deleteCount,
                                  java.lang.Integer substituteCount)
        Create the results for a detailed Levenshtein distance.
        Parameters:
        distance - distance between two character sequences.
        insertCount - insert character count
        deleteCount - delete character count
        substituteCount - substitute character count
    • Method Detail

      • getDistance

        public java.lang.Integer getDistance()
        Get the distance between two character sequences.
        Returns:
        distance between two character sequence
      • getInsertCount

        public java.lang.Integer getInsertCount()
        Get the number of insertion needed to change one character sequence into another.
        Returns:
        insert character count
      • getDeleteCount

        public java.lang.Integer getDeleteCount()
        Get the number of character deletion needed to change one character sequence to other.
        Returns:
        delete character count
      • getSubstituteCount

        public java.lang.Integer getSubstituteCount()
        Get the number of character substitution needed to change one character sequence into another.
        Returns:
        substitute character count
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object