Interface BlockPropertyValue
public interface BlockPropertyValue
The value of a block property.
-
Method Details
-
getAsString
String getAsString()- Returns:
- this block property value as a String
-
canBeInt
default boolean canBeInt()- Returns:
- whether this value can be queried as an integer
-
getAsInt
default int getAsInt()- Returns:
- this block property value as an integer
- Throws:
UnsupportedOperationException- if this value cannot be converted to an integer
-
canBeBoolean
default boolean canBeBoolean()- Returns:
- whether this value can be queried as a boolean
-
getAsBoolean
default boolean getAsBoolean()- Returns:
- this block property value as a boolean
- Throws:
UnsupportedOperationException- if this value cannot be converted to a boolean
-