Class InputParser

java.lang.Object
dev.esophose.playerparticles.util.inputparser.InputParser

public class InputParser
extends java.lang.Object
  • Constructor Summary

    Constructors 
    Constructor Description
    InputParser​(PPlayer pplayer, java.lang.String[] inputs)  
  • Method Summary

    Modifier and Type Method Description
    boolean hasNext()  
    <T> T next​(java.lang.Class<T> type)
    Gets the next input parsed and casted to the desired type
    int numRemaining()  

    Methods inherited from class java.lang.Object

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

  • Method Details

    • next

      public <T> T next​(java.lang.Class<T> type)
      Gets the next input parsed and casted to the desired type
      Type Parameters:
      T - The input class type
      Parameters:
      type - The type of input to parse
      Returns:
      The parsed input, casted to the desired type, or null if it was unable to be parsed
    • hasNext

      public boolean hasNext()
      Returns:
      true if there are remaining inputs to be parsed
    • numRemaining

      public int numRemaining()
      Returns:
      the number of input values remaining