Class UsbId

java.lang.Object
com.kosdev.kos.core.service.udev.UsbId

public class UsbId extends Object
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

    Constructors
    Constructor
    Description
    UsbId(int vendorId, int productId)
    Create a new id using the specified vendorId and productId.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    equals(int vendorId, int productId)
    Check if this id matches the supplied productId / vendorId.
    boolean
     
    int
     
    int
     
    int
     
    boolean
    Return true if the UsbId contains a valid vendorId / productId.
    void
    setProductId(int productId)
     
    void
    setVendorId(int vendorId)
     
     

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • UsbId

      public UsbId(int vendorId, int productId)
      Create a new id using the specified vendorId and productId.
      Parameters:
      vendorId - the usb vendor id
      productId - the usb product id
      Since:
      9
  • Method Details

    • isValid

      public boolean isValid()
      Return true if the UsbId contains 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 id
      productId - 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

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object