public class PID
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable
Currently does not support native access and generates random numbers for the process id.
| Modifier and Type | Field and Description |
|---|---|
protected int |
id
The int process identifier.
|
private static PID |
instance
The single instance of PID for the running Virtual Machine
|
private static long |
serialVersionUID
The serialVersionUID
|
| Modifier | Constructor and Description |
|---|---|
protected |
PID(int id)
Construct a new PID.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
clone()
Returns a copy of this PID.
|
private static PID |
create()
Create the PID for the current virtual mahcine.
|
boolean |
equals(java.lang.Object obj)
Check if the given object is equal to this PID.
|
int |
getID()
Get the int process identifier.
|
static PID |
getInstance()
Get the PID for the current virtual machine.
|
int |
hashCode()
Return the hash code of this PID.
|
java.lang.String |
toString()
Return a string representation of this PID.
|
java.lang.String |
toString(int radix)
Return a string representation of this PID.
|
private static final long serialVersionUID
protected final int id
private static PID instance
protected PID(int id)
id - Process identifier.public final int getID()
public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String toString(int radix)
radix - public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - Object to test equality with.public java.lang.Object clone()
clone in class java.lang.Objectpublic static PID getInstance()
private static PID create()