Class Parsable<T>

java.lang.Object
dev.esophose.playerparticles.util.inputparser.Parsable<T>
Direct Known Subclasses:
ParsableColorTransition, ParsableInteger, ParsableLocation, ParsableMaterial, ParsableNoteColor, ParsableOrdinaryColor, ParsableParticleEffect, ParsableParticleStyle, ParsableString, ParsableVibration

public abstract class Parsable<T>
extends java.lang.Object
  • Field Summary

    Fields 
    Modifier and Type Field Description
    protected java.lang.Class<T> targetType  
  • Constructor Summary

    Constructors 
    Constructor Description
    Parsable​(java.lang.Class<T> targetType)  
  • Method Summary

    Modifier and Type Method Description
    abstract T parse​(PPlayer pplayer, java.util.List<java.lang.String> inputs)
    Consumes and parses input from the list

    Methods inherited from class java.lang.Object

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

  • Constructor Details

    • Parsable

      public Parsable​(java.lang.Class<T> targetType)
  • Method Details

    • parse

      public abstract T parse​(PPlayer pplayer, java.util.List<java.lang.String> inputs)
      Consumes and parses input from the list
      Parameters:
      pplayer - The PPlayer who entered the input
      inputs - The input contents to try parsing
      Returns:
      The parsed value or null if parsing failed