Methods Summary |
---|
private static boolean | compare(java.lang.String s1, java.lang.String s2)
if (s1 == null) return (s2 == null);
return s1.equals(s2);
|
public boolean | equals(java.lang.Object obj)
if (obj instanceof UsbAccessory) {
UsbAccessory accessory = (UsbAccessory)obj;
return (compare(mManufacturer, accessory.getManufacturer()) &&
compare(mModel, accessory.getModel()) &&
compare(mDescription, accessory.getDescription()) &&
compare(mVersion, accessory.getVersion()) &&
compare(mUri, accessory.getUri()) &&
compare(mSerial, accessory.getSerial()));
}
return false;
|
public java.lang.String | getDescription()Returns a user visible description of the accessory.
return mDescription;
|
public java.lang.String | getManufacturer()Returns the manufacturer of the accessory.
return mManufacturer;
|
public java.lang.String | getModel()Returns the model name of the accessory.
return mModel;
|
public java.lang.String | getSerial()Returns the unique serial number for the accessory.
This is an optional serial number that can be used to differentiate
between individual accessories of the same model and manufacturer
return mSerial;
|
public java.lang.String | getUri()Returns the URI for the accessory.
This is an optional URI that might show information about the accessory
or provide the option to download an application for the accessory
return mUri;
|
public java.lang.String | getVersion()Returns the version of the accessory.
return mVersion;
|
public int | hashCode()
return ((mManufacturer == null ? 0 : mManufacturer.hashCode()) ^
(mModel == null ? 0 : mModel.hashCode()) ^
(mDescription == null ? 0 : mDescription.hashCode()) ^
(mVersion == null ? 0 : mVersion.hashCode()) ^
(mUri == null ? 0 : mUri.hashCode()) ^
(mSerial == null ? 0 : mSerial.hashCode()));
|
public java.lang.String | toString()
return "UsbAccessory[mManufacturer=" + mManufacturer +
", mModel=" + mModel +
", mDescription=" + mDescription +
", mVersion=" + mVersion +
", mUri=" + mUri +
", mSerial=" + mSerial + "]";
|