- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A functional interface that provides methods to get a value of a specific type at a specific index.
The value is hold by the object that implements this interface.
 
 
The value is hold by the object that implements this interface.
     The interface is functional because it has only one abstract method getAsString(int).
     All other methods rely on this method to get the value as a string and then parse it to the desired type.
     The getAsString(int) method must bei implemented correctly, or the other methods will not work as expected.
 
- getAsBoolean(int)to get the value as a boolean
- getAsNumber(int)to get the value as a number
- getAsByte(int)to get the value as a byte
- getAsShort(int)to get the value as a short
- getAsInteger(int)to get the value as an integer
- getAsLong(int)to get the value as a long
- getAsFloat(int)to get the value as a float
- getAsDouble(int)to get the value as a double
- getAs(int, ThrowableFunction)to get the value as the result of the given parser
- 
Method SummaryModifier and TypeMethodDescriptiondefault <T> TgetAs(int index, @NotNull ThrowableFunction<String, T, ? extends Exception> parser) Returns the value which is hold by this object at the given index.
 The value is parsed as the result of the given parser.
 The parser must not be able to handle null values.
 In the case the parser is not able to parse the value, it should not return null, it should throw an exception.default booleangetAsBoolean(int index) Returns the value which is hold by this object as a boolean at the given index.default bytegetAsByte(int index) Returns the value which is hold by this object as a byte at the given index.default doublegetAsDouble(int index) Returns the value which is hold by this object as a double at the given index.default floatgetAsFloat(int index) Returns the value which is hold by this object as a float at the given index.default intgetAsInteger(int index) Returns the value which is hold by this object as an integer at the given index.default longgetAsLong(int index) Returns the value which is hold by this object as a long at the given index.default @NotNull NumbergetAsNumber(int index) Returns the value which is hold by this object as a number at the given index.default shortgetAsShort(int index) Returns the value which is hold by this object as a short at the given index.@NotNull StringgetAsString(int index) Returns the value which is hold by this object as a string at the given index.
- 
Method Details- 
getAsStringReturns the value which is hold by this object as a string at the given index.- Parameters:
- index- The index of the value
- Returns:
- The value as a string
- Throws:
- IndexOutOfBoundsException- If the index is out of bounds
 
- 
getAsBooleandefault boolean getAsBoolean(int index) Returns the value which is hold by this object as a boolean at the given index.- Parameters:
- index- The index of the value
- Returns:
- The value as a boolean
- Throws:
- IndexOutOfBoundsException- If the index is out of bounds
- IllegalArgumentException- If the value is not a boolean (e.g. not "true" or "false")
 
- 
getAsNumberReturns the value which is hold by this object as a number at the given index.- Parameters:
- index- The index of the value
- Returns:
- The value as a number
- Throws:
- IndexOutOfBoundsException- If the index is out of bounds
- IllegalArgumentException- If the value is not a number
 
- 
getAsBytedefault byte getAsByte(int index) Returns the value which is hold by this object as a byte at the given index.- Parameters:
- index- The index of the value
- Returns:
- The value as a byte
- Throws:
- IndexOutOfBoundsException- If the index is out of bounds
- IllegalArgumentException- If the value is not a byte
 
- 
getAsShortdefault short getAsShort(int index) Returns the value which is hold by this object as a short at the given index.- Parameters:
- index- The index of the value
- Returns:
- The value as a short
- Throws:
- IndexOutOfBoundsException- If the index is out of bounds
- IllegalArgumentException- If the value is not a short
 
- 
getAsIntegerdefault int getAsInteger(int index) Returns the value which is hold by this object as an integer at the given index.- Parameters:
- index- The index of the value
- Returns:
- The value as an integer
- Throws:
- IndexOutOfBoundsException- If the index is out of bounds
- IllegalArgumentException- If the value is not an integer
 
- 
getAsLongdefault long getAsLong(int index) Returns the value which is hold by this object as a long at the given index.- Parameters:
- index- The index of the value
- Returns:
- The value as a long
- Throws:
- IndexOutOfBoundsException- If the index is out of bounds
- IllegalArgumentException- If the value is not a long
 
- 
getAsFloatdefault float getAsFloat(int index) Returns the value which is hold by this object as a float at the given index.- Parameters:
- index- The index of the value
- Returns:
- The value as a float
- Throws:
- IndexOutOfBoundsException- If the index is out of bounds
- IllegalArgumentException- If the value is not a float
 
- 
getAsDoubledefault double getAsDouble(int index) Returns the value which is hold by this object as a double at the given index.- Parameters:
- index- The index of the value
- Returns:
- The value as a double
- Throws:
- IndexOutOfBoundsException- If the index is out of bounds
- IllegalArgumentException- If the value is not a double
 
- 
getAs@NotNull default <T> T getAs(int index, @NotNull @NotNull ThrowableFunction<String, T, ? extends Exception> parser) Returns the value which is hold by this object at the given index.
 The value is parsed as the result of the given parser.
 The parser must not be able to handle null values.
 In the case the parser is not able to parse the value, it should not return null, it should throw an exception.- Type Parameters:
- T- The type of the parsed value
- Parameters:
- index- The index of the value
- parser- The parser to parse the value
- Returns:
- The value as the result of the parser
- Throws:
- NullPointerException- If the parser is null
- IndexOutOfBoundsException- If the index is out of bounds
- IllegalArgumentException- If the value could not be parsed
 
 
-