public abstract class UserData extends java.lang.Object implements UserDataContainer
n.setUserInfo ("3DData", new 3DData (
))
.
Later, to access this information, the call might be 3DData dd =
(3DData) n.getUserInfo("3DData").
UserDataContainer.CopyAction
Modifier and Type | Field and Description |
---|---|
static UserDataContainer.CopyAction |
CLONE
A CopyAction that clones UserData--that is, it uses the Java
clone() call to clone the object. |
static UserDataContainer.CopyAction |
REMOVE
Causes the userdata not to be copied over, and instead returns null.
|
static UserDataContainer.CopyAction |
SHARED
A CopyAction that links UserData--that is, points to the original data.
|
Constructor and Description |
---|
UserData() |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone() |
java.lang.String |
toString() |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addUserDatum, containsUserDatumKey, getUserDatum, getUserDatumCopyAction, getUserDatumKeyIterator, importUserData, removeUserDatum, setUserDatum
public static final UserDataContainer.CopyAction CLONE
clone()
call to clone the object. Throws
a CloneNotSupportedException if clone isn't allowed.public static final UserDataContainer.CopyAction SHARED
String s = "X";
String t = s;
s = "Y";
System.out.pritnln( t ); // will still contain X.
public static final UserDataContainer.CopyAction REMOVE
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in interface UserDataContainer
clone
in class java.lang.Object
java.lang.CloneNotSupportedException