Class Options.Entry

java.lang.Object
dev.goldmensch.fluava.function.Options.Entry
Enclosing class:
Options

public static class Options.Entry extends Object
An entry that pairs a key and the associated value
  • Method Details

    • key

      public String key()
      Returns:
      the passed key
    • as

      public <T> T as(Class<T> type, T fallback) throws FunctionException
      gets the argument associated with the given key
      Parameters:
      type - the variables class to what it should be converted (via proteus)
      fallback - the fallback value, that should be returned if this argument isn't provided by the caller
      Returns:
      the provided value
      Throws:
      FunctionException
    • as

      public <T> T as(Class<T> type) throws FunctionException
      gets the argument associated with the given key
      Parameters:
      type - the variables class to what it should be converted (via proteus)
      Returns:
      the provided value
      Throws:
      FunctionException - if there's no value associated with this key