All Packages This Package Class Hierarchy Class Search Index
java.lang.Object | +----NPMObject | +----utah.npm.core.Reference
Summary |
public final class Reference extends NPMObject { // Fields 1 public static final Reference NullReference; // Constructors 4 public Reference(); public Reference(Refable); public Reference(Refable, int); public Reference(int); // Methods 7 public boolean check(); public boolean compare(Reference); public void destroy(); public boolean equals(Object); public void nullify(); public String toString(); public Class type(); }
A Reference object is a cross-process capability to any Reference-able NPMObject.
See Also: Refable
Fields |
· NullReference | Summary | Top |
public static final Reference NullReference
Constructors |
· Reference | Summary | Top |
public Reference()
Construct a null reference. It can be defined to Reference a specific object by using the reference method of the target object.
See Also: Refable.reference
· Reference | Summary | Top |
public Reference(Refable refObj)
Construct a new reference that will refer to the provided object.
Parameter Description refObj the object the reference will refer to
· Reference | Summary | Top |
public Reference(int hashCode)
Construct a null reference with the given hash code.
Parameter Description hashCode the hash code for this reference
See Also: Refable.reference
· Reference | Summary | Top |
public Reference(Refable refObj, int hashCode)
Construct a reference to the provided object with the provided hash code.
Parameter Description refObj the object to create a reference to hashCode the hashCode of the reference object (not the refObj)
Methods |
· type | Summary | Top |
public Class type()
Return Class of object this object points to.
- Returns:
- Class object for object this reference points to, or null if this reference is null.
· destroy | Summary | Top |
public void destroy()
Destroy this reference object.
· compare | Summary | Top |
public boolean compare(Reference otherRef)
Returns true if this and given ref point to the same object. If both refs are null, returns true. If one ref is null, returns false.
Parameter Description otherRef the reference to compare this reference to
- Returns:
- true if this and otherRef point to the same object, false otherwise.
· nullify | Summary | Top |
public void nullify()
Nullify a reference, clearing its link to whatever its touching. After this opertion, this.compare(Reference.NullReference) will return true.
· equals | Summary | Top |
public boolean equals(Object obj)
Equality is determined by the objects a Reference points to. If two References refer to the exact same object they are "equal."
Parameter Description obj the Object to compare to.
- Returns:
- true if obj is a Reference object that points to the same object as this.
See Also: compare
· check | Summary | Top |
public boolean check()
Return true if this reference is valid.
- Returns:
- true if this reference is valid (non-null).
· toString | Summary | Top |
public String toString()
Return a string representation of this Reference (includes the type and hashCode of the target object.
- Returns:
- a string representation of this Reference
All Packages This Package Class Hierarchy Class Search IndexFreshly brewed Java API Documentation automatically generated with polardoc Version 1.0.7