Class StringsComparator.Snake

  • Enclosing class:
    StringsComparator

    private static class StringsComparator.Snake
    extends java.lang.Object
    This class is a simple placeholder to hold the end part of a path under construction in a StringsComparator.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int diag
      Diagonal number.
      private int end
      End index.
      private int start
      Start index.
    • Constructor Summary

      Constructors 
      Constructor Description
      Snake​(int start, int end, int diag)
      Simple constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getDiag()
      Get the diagonal number of the snake.
      int getEnd()
      Get the end index of the snake.
      int getStart()
      Get the start index of the snake.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • start

        private final int start
        Start index.
      • end

        private final int end
        End index.
      • diag

        private final int diag
        Diagonal number.
    • Constructor Detail

      • Snake

        Snake​(int start,
              int end,
              int diag)
        Simple constructor. Creates a new instance of Snake with specified indices.
        Parameters:
        start - start index of the snake
        end - end index of the snake
        diag - diagonal number
    • Method Detail

      • getStart

        public int getStart()
        Get the start index of the snake.
        Returns:
        start index of the snake
      • getEnd

        public int getEnd()
        Get the end index of the snake.
        Returns:
        end index of the snake
      • getDiag

        public int getDiag()
        Get the diagonal number of the snake.
        Returns:
        diagonal number of the snake