Class AbstractHead

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.List<Head> newHeads  
      private boolean star  
    • Constructor Summary

      Constructors 
      Constructor Description
      AbstractHead​(boolean star)  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.List<Head> getNextHeads​(char c)
      Get the character which decides which heads are returned
      (package private) boolean isStar()  
      protected abstract boolean matches​(char c)
      Whether the char matches
      void setNewHeads​(java.util.List<Head> newHeads)
      Set Heads which will not be modified.
      • Methods inherited from class java.lang.Object

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

      • newHeads

        private java.util.List<Head> newHeads
      • star

        private final boolean star
    • Constructor Detail

      • AbstractHead

        AbstractHead​(boolean star)
    • Method Detail

      • matches

        protected abstract boolean matches​(char c)
        Whether the char matches
        Parameters:
        c - a char.
        Returns:
        whether the char matches
      • setNewHeads

        public final void setNewHeads​(java.util.List<Head> newHeads)
        Set Heads which will not be modified.
        Parameters:
        newHeads - a list of Heads which will not be modified.
      • getNextHeads

        public java.util.List<Head> getNextHeads​(char c)
        Get the character which decides which heads are returned
        Specified by:
        getNextHeads in interface Head
        Parameters:
        c - the character which decides which heads are returned.
        Returns:
        a list of heads based on the input.
      • isStar

        boolean isStar()