Record Class PutIfAbsentResult<S extends Signal<?>>
java.lang.Object
java.lang.Record
com.vaadin.flow.signals.operations.PutIfAbsentResult<S>
- Type Parameters:
S- the signal type- Record Components:
created-trueif a new entry was inserted,falseif the key already existedentry- the signal for the map entry, notnull
- All Implemented Interfaces:
Serializable
public record PutIfAbsentResult<S extends Signal<?>>(boolean created, S extends Signal<?> entry)
extends Record
implements Serializable
The result of a put-if-absent operation. Contains information about whether a
new entry was created and a reference to the signal for the entry.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionPutIfAbsentResult(boolean created, S entry) Creates an instance of aPutIfAbsentResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleancreated()Returns the value of thecreatedrecord component.entry()Returns the value of theentryrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Method Details
-
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 '=='. -
created
public boolean created()Returns the value of thecreatedrecord component.- Returns:
- the value of the
createdrecord component
-
entry
Returns the value of theentryrecord component.- Returns:
- the value of the
entryrecord component
-