Class OptParse.OptHandler<E>

  • Enclosing class:
    OptParse<E>

    public abstract static class OptParse.OptHandler<E>
    extends java.lang.Object
    a class to handle one option
    • Field Summary

      Fields 
      Modifier and Type Field Description
      java.lang.String help  
      java.lang.String longOpt  
      char shortOpt  
    • Constructor Summary

      Constructors 
      Constructor Description
      OptHandler()  
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      abstract E handle​(OptParse<E> parser, E e, java.lang.String arg)
      handler for the option
      • Methods inherited from class java.lang.Object

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

      • shortOpt

        public char shortOpt
      • longOpt

        public java.lang.String longOpt
      • help

        public java.lang.String help
    • Constructor Detail

      • OptHandler

        public OptHandler()
    • Method Detail

      • handle

        public abstract E handle​(OptParse<E> parser,
                                 E e,
                                 java.lang.String arg)
        handler for the option
        Parameters:
        parser - the parser object that called this handler
        e - the object to modify according to the option
        arg - the (optional) argument to the option
        Returns:
        a value of the good type (not necessarily the given one)