Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.opensolaris.os.dtrace
Class UserSymbolRecord.Value

    java.lang.Object
      org.opensolaris.os.dtrace.UserSymbolRecord.Value

All Implemented Interfaces:
  java.io.Serializable, java.lang.Comparable<UserSymbolRecord.Value>

Enclosing class:
  UserSymbolRecord

    public static final class UserSymbolRecord.Value

extends java.lang.Object
implements java.io.Serializable, java.lang.Comparable<UserSymbolRecord.Value>

The composite value of a symbol's process ID and user address.

Immutable. Supports persistence using `XMLEncoder`.

See Also:
  Serialized Form

Constructor Summary
`UserSymbolRecord.Value(int pid, long addressValue)` Creates a composite value with the given user process ID and symbol address.

Method Summary
`int` | `compareTo(UserSymbolRecord.Value v)` Compares this value with the given `UserSymbolRecord.Value` and orders by process ID first and address second.
`boolean` | `equals(java.lang.Object o)` Compares the specified object with this `UserSymbolRecord.Value` for equality.
`long` | `getAddress()` Gets the symbol's user address.
`int` | `getProcessID()` Gets the process ID associated with this value's user address.
`int` | `hashCode()` Overridden to ensure that equal instances have equal hash codes.
`java.lang.String` | `toString()` Gets a string representation of this `UserSymbolRecord.Value` instance useful for logging and not intended for display.

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### UserSymbolRecord.Value

    public UserSymbolRecord.Value(int pid,
                                  long addressValue)

  Creates a composite value with the given user process ID and symbol address.

  Supports XML persistence.

  Parameters:
    `pid` - non-negative process ID
    `addressValue` - symbol address
  Throws:
    `java.lang.IllegalArgumentException` - if the given process ID is negative

Method Detail

### getProcessID

    public int getProcessID()

  Gets the process ID associated with this value's user address.

  Returns:
    non-negative pid

### getAddress

    public long getAddress()

  Gets the symbol's user address.

  Returns:
    the symbol's user address

### equals

    public boolean equals(java.lang.Object o)

  Compares the specified object with this `UserSymbolRecord.Value` for equality. Returns `true` if and only if the specified object is also a `UserSymbolRecord.Value` and both values have the same process ID and the same address.

  Overrides:
    `equals` in class `java.lang.Object`
  Returns:
    `true` if and only if the specified object is also a `UserSymbolRecord.Value` and both values have the same process ID and the same address

### hashCode

    public int hashCode()

  Overridden to ensure that equal instances have equal hash codes.

  Overrides:
    `hashCode` in class `java.lang.Object`

### compareTo

    public int compareTo(UserSymbolRecord.Value v)

  Compares this value with the given `UserSymbolRecord.Value` and orders by process ID first and address second. The comparison treats addresses as unsigned values so the ordering is consistent with that defined in the native DTrace library. The `compareTo()` method is compatible with `equals()`.

  Specified by:
    `compareTo` in interface `java.lang.Comparable<UserSymbolRecord.Value>`
  Returns:
    -1, 0, or 1 as this value's combined process ID and address is less than, equal to, or greater than the given value's combined process ID and address

### toString

    public java.lang.String toString()

  Gets a string representation of this `UserSymbolRecord.Value` instance useful for logging and not intended for display. The exact details of the representation are unspecified and subject to change, but the following format may be regarded as typical:

       class-name[property1 = value1, property2 = value2]

  Overrides:
    `toString` in class `java.lang.Object`

Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD