Better pointer names
This commit is contained in:
parent
d64fb4111a
commit
45dd06cd2f
@ -36,7 +36,7 @@ import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||
public final class Context
|
||||
{
|
||||
/** The native pointer to the context structure. */
|
||||
private long pointer;
|
||||
private long contextPointer;
|
||||
|
||||
/**
|
||||
* Constructs a new libusb context. Must be passed to
|
||||
@ -54,13 +54,13 @@ public final class Context
|
||||
*/
|
||||
public long getPointer()
|
||||
{
|
||||
return this.pointer;
|
||||
return this.contextPointer;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode()
|
||||
{
|
||||
return new HashCodeBuilder().append(this.pointer).toHashCode();
|
||||
return new HashCodeBuilder().append(this.contextPointer).toHashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -69,6 +69,6 @@ public final class Context
|
||||
if (this == obj) return true;
|
||||
if (obj == null || getClass() != obj.getClass()) return false;
|
||||
final Context other = (Context) obj;
|
||||
return this.pointer == other.pointer;
|
||||
return this.contextPointer == other.contextPointer;
|
||||
}
|
||||
}
|
||||
|
||||
@ -37,7 +37,7 @@ import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||
public final class Device
|
||||
{
|
||||
/** The native pointer to the device structure. */
|
||||
private long pointer;
|
||||
private long devicePointer;
|
||||
|
||||
/**
|
||||
* Package-private constructor to prevent manual instantiation. Devices are
|
||||
@ -55,13 +55,13 @@ public final class Device
|
||||
*/
|
||||
public long getPointer()
|
||||
{
|
||||
return this.pointer;
|
||||
return this.devicePointer;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode()
|
||||
{
|
||||
return new HashCodeBuilder().append(this.pointer).toHashCode();
|
||||
return new HashCodeBuilder().append(this.devicePointer).toHashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -70,12 +70,12 @@ public final class Device
|
||||
if (this == obj) return true;
|
||||
if (obj == null || getClass() != obj.getClass()) return false;
|
||||
final Device other = (Device) obj;
|
||||
return this.pointer == other.pointer;
|
||||
return this.devicePointer == other.devicePointer;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return String.format("libusb device 0x%x", this.pointer);
|
||||
return String.format("libusb device 0x%x", this.devicePointer);
|
||||
}
|
||||
}
|
||||
|
||||
@ -27,7 +27,7 @@ import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||
public final class DeviceHandle
|
||||
{
|
||||
/** The native pointer to the device handle structure. */
|
||||
private long pointer;
|
||||
private long handlePointer;
|
||||
|
||||
/**
|
||||
* Constructs a new device handle. Must be passed to
|
||||
@ -46,13 +46,13 @@ public final class DeviceHandle
|
||||
*/
|
||||
public long getPointer()
|
||||
{
|
||||
return this.pointer;
|
||||
return this.handlePointer;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode()
|
||||
{
|
||||
return new HashCodeBuilder().append(this.pointer).toHashCode();
|
||||
return new HashCodeBuilder().append(this.handlePointer).toHashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -61,12 +61,12 @@ public final class DeviceHandle
|
||||
if (this == obj) return true;
|
||||
if (obj == null || getClass() != obj.getClass()) return false;
|
||||
final DeviceHandle other = (DeviceHandle) obj;
|
||||
return this.pointer != other.pointer;
|
||||
return this.handlePointer != other.handlePointer;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return String.format("libusb handle 0x%x", this.pointer);
|
||||
return String.format("libusb handle 0x%x", this.handlePointer);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user