Package it.unitn.disi.ds1.qtop
Record Class Utils.WriteRequest
java.lang.Object
java.lang.Record
it.unitn.disi.ds1.qtop.Utils.WriteRequest
- Record Components:
newValue- the new value proposed by the ClientnRequest- the number of the request
- All Implemented Interfaces:
Serializable
- Enclosing class:
Utils
public static record Utils.WriteRequest(int newValue, int nRequest)
extends Record
implements Serializable
Message used by a Client to ask for a read operation.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionWriteRequest(int newValue, int nRequest) Creates an instance of aWriteRequestrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intnewValue()Returns the value of thenewValuerecord component.intnRequest()Returns the value of thenRequestrecord component.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. All components in this record class are compared with '=='. -
newValue
public int newValue()Returns the value of thenewValuerecord component.- Returns:
- the value of the
newValuerecord component
-
nRequest
public int nRequest()Returns the value of thenRequestrecord component.- Returns:
- the value of the
nRequestrecord component
-