Record Class FormComponentDefaultValueResolver.RangeDefaultValue
java.lang.Object
java.lang.Record
ch.tocco.nice2.model.form.api.form2.FormComponentDefaultValueResolver.RangeDefaultValue
- Enclosing interface:
FormComponentDefaultValueResolver
-
Constructor Summary
ConstructorsConstructorDescriptionRangeDefaultValue(boolean isRangeValue, @Nullable Object from, @Nullable Object to) Creates an instance of aRangeDefaultValuerecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.@Nullable Objectfrom()Returns the value of thefromrecord component.final inthashCode()Returns a hash code value for this object.booleanReturns the value of theisRangeValuerecord component.@Nullable Objectto()Returns the value of thetorecord component.final StringtoString()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 aRangeDefaultValuerecord class.- Parameters:
isRangeValue- the value for theisRangeValuerecord componentfrom- the value for thefromrecord componentto- the value for thetorecord component
-
-
Method Details
-
withDefaultField
public static FormComponentDefaultValueResolver.RangeDefaultValue withDefaultField(@Nullable @Nullable Object value, @Nullable @Nullable String defaultField) -
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
isRangeValue
public boolean isRangeValue()Returns the value of theisRangeValuerecord component.- Returns:
- the value of the
isRangeValuerecord component
-
from
Returns the value of thefromrecord component.- Returns:
- the value of the
fromrecord component
-
to
Returns the value of thetorecord component.- Returns:
- the value of the
torecord component
-