Class Args


  • public class Args
    extends java.lang.Object
    Iterates over a list of String arguments.
    • Constructor Summary

      Constructors 
      Constructor Description
      Args​(@NotNull java.lang.String @NotNull [] args)
      Creates a new instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      @NotNull java.lang.String get()
      Returns the next argument.
      @NotNull java.lang.String getPrev()
      Returns the current argument.
      boolean hasMore()
      Returns whether more arguments exist.
      • Methods inherited from class java.lang.Object

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

      • Args

        public Args​(@NotNull
                    @NotNull java.lang.String @NotNull [] args)
        Creates a new instance.
        Parameters:
        args - the string arguments
    • Method Detail

      • get

        @NotNull
        public @NotNull java.lang.String get()
                                      throws java.io.IOException
        Returns the next argument.
        Returns:
        the next argument
        Throws:
        java.io.IOException - if no next argument exists
      • getPrev

        @NotNull
        public @NotNull java.lang.String getPrev()
        Returns the current argument. This is the same value that was returned by the preceding call to get().
        Returns:
        the current argument
      • hasMore

        public boolean hasMore()
        Returns whether more arguments exist.
        Returns:
        whether more arguments exist