java.lang.Object
java.lang.Record
net.codecrete.usb.USBControlTransfer
- Record Components:
requestType- request typerecipient- recipientrequest- request codevalue- valueindex- index
public record USBControlTransfer(USBRequestType requestType, USBRecipient recipient, byte request, short value, short index)
extends Record
USB control transfer parameters.
See USB specification for additional information
-
Constructor Summary
ConstructorsConstructorDescriptionUSBControlTransfer(USBRequestType requestType, USBRecipient recipient, byte request, short value, short index) Creates an instance of aUSBControlTransferrecord 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.shortindex()Returns the value of theindexrecord component.Returns the value of therecipientrecord component.byterequest()Returns the value of therequestrecord component.Returns the value of therequestTyperecord component.final StringtoString()Returns a string representation of this record class.shortvalue()Returns the value of thevaluerecord component.
-
Constructor Details
-
USBControlTransfer
public USBControlTransfer(USBRequestType requestType, USBRecipient recipient, byte request, short value, short index) Creates an instance of aUSBControlTransferrecord class.- Parameters:
requestType- the value for therequestTyperecord componentrecipient- the value for therecipientrecord componentrequest- the value for therequestrecord componentvalue- the value for thevaluerecord componentindex- the value for theindexrecord component
-
-
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 '=='. -
requestType
Returns the value of therequestTyperecord component.- Returns:
- the value of the
requestTyperecord component
-
recipient
Returns the value of therecipientrecord component.- Returns:
- the value of the
recipientrecord component
-
request
public byte request()Returns the value of therequestrecord component.- Returns:
- the value of the
requestrecord component
-
value
public short value()Returns the value of thevaluerecord component.- Returns:
- the value of the
valuerecord component
-
index
public short index()Returns the value of theindexrecord component.- Returns:
- the value of the
indexrecord component
-