class DefaultNumberingPolicy extends java.lang.Object implements NumberingPolicy
This is a class to manage the naming policy when creating objects.
Constructor and Description |
---|
DefaultNumberingPolicy()
Constructor
|
Modifier and Type | Method and Description |
---|---|
protected long |
find(java.lang.Object obj)
Find the object
|
java.lang.String |
onCreate(RTObject_impl obj)
Create the name when creating object
|
void |
onDelete(RTObject_impl obj)
Delete the name when deleting object
|
public java.lang.String onCreate(RTObject_impl obj)
Create the name when creating object. Create the name corresponding to the number of generated instances.
onCreate
in interface NumberingPolicy
obj
-
The target object for the name creationpublic void onDelete(RTObject_impl obj)
Delete the name when deleting object. Substract the generated number of instances when deleting the object.
onDelete
in interface NumberingPolicy
obj
-
The target object for the name deleteprotected long find(java.lang.Object obj) throws java.lang.Exception
Find the specified object in the object list and return its index when it is stored.
obj
-
The target object for the findjava.lang.Exception
-
The object doesn't exist.