Record Class FormComponentDefaultValueResolver.RangeDefaultValue
java.lang.Object
java.lang.Record
ch.tocco.nice2.model.form.api.form2.FormComponentDefaultValueResolver.RangeDefaultValue
- Enclosing interface:
FormComponentDefaultValueResolver
-
Constructor Summary
ConstructorDescriptionRangeDefaultValue
(boolean isRangeValue, @Nullable Object from, @Nullable Object to) Creates an instance of aRangeDefaultValue
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.@Nullable Object
from()
Returns the value of thefrom
record component.final int
hashCode()
Returns a hash code value for this object.boolean
Returns the value of theisRangeValue
record component.@Nullable Object
to()
Returns the value of theto
record component.final String
toString()
Returns a string representation of this record class.withDefaultField
(@Nullable Object value, @Nullable String defaultField)
-
Constructor Details
-
RangeDefaultValue
public RangeDefaultValue(boolean isRangeValue, @Nullable @Nullable Object from, @Nullable @Nullable Object to) Creates an instance of aRangeDefaultValue
record class.- Parameters:
isRangeValue
- the value for theisRangeValue
record componentfrom
- the value for thefrom
record componentto
- the value for theto
record component
-
-
Method Details
-
withDefaultField
public static FormComponentDefaultValueResolver.RangeDefaultValue withDefaultField(@Nullable @Nullable Object value, @Nullable @Nullable String defaultField) -
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. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
isRangeValue
public boolean isRangeValue()Returns the value of theisRangeValue
record component.- Returns:
- the value of the
isRangeValue
record component
-
from
Returns the value of thefrom
record component.- Returns:
- the value of the
from
record component
-
to
Returns the value of theto
record component.- Returns:
- the value of the
to
record component
-