Record Class Case
java.lang.Object
java.lang.Record
io.openems.edge.core.appmanager.formly.Case
public record Case(com.google.gson.JsonElement value, com.google.gson.JsonElement defaultValue)
extends Record
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncom.google.gson.JsonElement
Returns the value of thedefaultValue
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.com.google.gson.JsonObject
Creates aJsonObject
from thisCase
.final String
toString()
Returns a string representation of this record class.com.google.gson.JsonElement
value()
Returns the value of thevalue
record component.
-
Constructor Details
-
Case
-
Case
-
Case
public Case(com.google.gson.JsonElement value, com.google.gson.JsonElement defaultValue) Creates an instance of aCase
record class.- Parameters:
value
- the value for thevalue
record componentdefaultValue
- the value for thedefaultValue
record component
-
-
Method Details
-
toJsonObject
public com.google.gson.JsonObject toJsonObject()Creates aJsonObject
from thisCase
.- Returns:
- the
JsonObject
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object)
. -
value
public com.google.gson.JsonElement value()Returns the value of thevalue
record component.- Returns:
- the value of the
value
record component
-
defaultValue
public com.google.gson.JsonElement defaultValue()Returns the value of thedefaultValue
record component.- Returns:
- the value of the
defaultValue
record component
-