Class ParameterExpander.Value

java.lang.Object
eu.bandm.tools.expander.ParameterExpander.Value
Enclosing class:
ParameterExpander

public abstract static class ParameterExpander.Value extends Object
A parameter value, containing either a substitution text or an error.
Since:
1.2
  • Field Details

  • Method Details

    • isValid

      public abstract boolean isValid()
      Checks whether this value contains a valid substitution text.
      Returns:
      true if the value contains a substitution text; false if it contains an error.
    • getText

      public abstract String getText() throws ExplicitErrorException
      Returns the contained substitution text or throws the contained error.
      Returns:
      the contained substitution text, if available
      Throws:
      ExplicitErrorException - the contained error, if available
    • of

      public static ParameterExpander.Value of(String text)
      Creates a value with the given substitution text.
      Parameters:
      text - the substitution text
      Returns:
      a value containing the given substitution text