Class DaitchMokotoffSoundex.Branch

  • Enclosing class:
    DaitchMokotoffSoundex

    private static final class DaitchMokotoffSoundex.Branch
    extends java.lang.Object
    Inner class representing a branch during DM soundex encoding.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.StringBuilder builder  
      private java.lang.String cachedString  
      private java.lang.String lastReplacement  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private Branch()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      DaitchMokotoffSoundex.Branch createBranch()
      Creates a new branch, identical to this branch.
      boolean equals​(java.lang.Object other)  
      void finish()
      Finish this branch by appending '0's until the maximum code length has been reached.
      int hashCode()  
      void processNextReplacement​(java.lang.String replacement, boolean forceAppend)
      Process the next replacement to be added to this branch.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • builder

        private final java.lang.StringBuilder builder
      • cachedString

        private java.lang.String cachedString
      • lastReplacement

        private java.lang.String lastReplacement
    • Constructor Detail

      • Branch

        private Branch()
    • Method Detail

      • createBranch

        public DaitchMokotoffSoundex.Branch createBranch()
        Creates a new branch, identical to this branch.
        Returns:
        a new, identical branch
      • equals

        public boolean equals​(java.lang.Object other)
        Overrides:
        equals in class java.lang.Object
      • finish

        public void finish()
        Finish this branch by appending '0's until the maximum code length has been reached.
      • hashCode

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

        public void processNextReplacement​(java.lang.String replacement,
                                           boolean forceAppend)
        Process the next replacement to be added to this branch.
        Parameters:
        replacement - the next replacement to append
        forceAppend - indicates if the default processing shall be overridden
      • toString

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