Package com.kosdev.kos.core.service.udev
Class UsbId
java.lang.Object
com.kosdev.kos.core.service.udev.UsbId
Represents the id of a usb device by vendorId / productId. This includes
support for equality to make various comparisons easy.
- Since:
- 9
- Version:
- 9
-
Constructor Summary
ConstructorsConstructorDescriptionUsbId(int vendorId, int productId) Create a new id using the specified vendorId and productId. -
Method Summary
Modifier and TypeMethodDescriptionbooleanequals(int vendorId, int productId) Check if this id matches the supplied productId / vendorId.booleanintintinthashCode()booleanisValid()Return true if theUsbIdcontains a valid vendorId / productId.voidsetProductId(int productId) voidsetVendorId(int vendorId) toString()
-
Constructor Details
-
UsbId
public UsbId(int vendorId, int productId) Create a new id using the specified vendorId and productId.- Parameters:
vendorId- the usb vendor idproductId- the usb product id- Since:
- 9
-
-
Method Details
-
isValid
public boolean isValid()Return true if theUsbIdcontains a valid vendorId / productId. -
equals
public boolean equals(int vendorId, int productId) Check if this id matches the supplied productId / vendorId.- Parameters:
vendorId- the usb vendor idproductId- the usb product id- Since:
- 9
-
getVendorId
public int getVendorId() -
getProductId
public int getProductId() -
setVendorId
public void setVendorId(int vendorId) -
setProductId
public void setProductId(int productId) -
equals
-
hashCode
public int hashCode() -
toString
-