Package net.fabricmc.loader.api.metadata
Interface CustomValue
- All Known Subinterfaces:
 CustomValue.CvArray,CustomValue.CvObject
public interface CustomValue
Represents a custom value in the 
fabric.mod.json.- 
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceRepresents anCustomValue.CvType.ARRAYvalue.static interfaceRepresents anCustomValue.CvType.OBJECTvalue.static enumThe possible types of a custom value. - 
Method Summary
Modifier and TypeMethodDescriptionReturns this value as anCustomValue.CvType.ARRAY.booleanReturns this value as aCustomValue.CvType.BOOLEAN.Returns this value as aCustomValue.CvType.NUMBER.Returns this value as anCustomValue.CvType.OBJECT.Returns this value as aCustomValue.CvType.STRING.getType()Returns the type of the value. 
- 
Method Details
- 
getType
CustomValue.CvType getType()Returns the type of the value. - 
getAsObject
CustomValue.CvObject getAsObject()Returns this value as anCustomValue.CvType.OBJECT.- Returns:
 - this value
 - Throws:
 ClassCastException- if this value is not an object
 - 
getAsArray
CustomValue.CvArray getAsArray()Returns this value as anCustomValue.CvType.ARRAY.- Returns:
 - this value
 - Throws:
 ClassCastException- if this value is not an array
 - 
getAsString
String getAsString()Returns this value as aCustomValue.CvType.STRING.- Returns:
 - this value
 - Throws:
 ClassCastException- if this value is not a string
 - 
getAsNumber
Number getAsNumber()Returns this value as aCustomValue.CvType.NUMBER.- Returns:
 - this value
 - Throws:
 ClassCastException- if this value is not a number
 - 
getAsBoolean
boolean getAsBoolean()Returns this value as aCustomValue.CvType.BOOLEAN.- Returns:
 - this value
 - Throws:
 ClassCastException- if this value is not a boolean
 
 -