Class ContinueBarrier


  • public class ContinueBarrier
    extends java.lang.Object
    Barrier to block the calling thread until a command is given on the command line.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) java.lang.String label  
    • Constructor Summary

      Constructors 
      Constructor Description
      ContinueBarrier​(java.lang.String label)
      Create a barrier that will display the provided label and interact via System.out, System.in and Scanner.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean await()
      Await for input that matches the provided command.
      • Methods inherited from class java.lang.Object

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

      • label

        final java.lang.String label
    • Constructor Detail

      • ContinueBarrier

        public ContinueBarrier​(java.lang.String label)
        Create a barrier that will display the provided label and interact via System.out, System.in and Scanner.
        Parameters:
        label - to prompt the user.
    • Method Detail

      • await

        public boolean await()
        Await for input that matches the provided command.
        Returns:
        true if y otherwise false.