public interface Owner
Ownable
implementations can
report ownership changes to their owners. This is used by both Components and Entities
to track which objects they own and disown them when they are removed from the
EntitySystem.Modifier and Type | Method and Description |
---|---|
Owner |
notifyOwnershipGranted(Ownable obj)
Notify this Owner that it is now obj's owner.
|
void |
notifyOwnershipRevoked(Ownable obj)
Notify this Owner that it is no longer obj's owner.
|
Owner notifyOwnershipGranted(Ownable obj)
Ownable
implementations in response to calls to Ownable.setOwner(Owner)
.
This method returns the true Owner instance, to allow for flyweight objects to act
as Owners. In this case, they will return the canonical owner for the datum they
represent. In regular cases, this will return itself after recording ownership.obj
- The newly owned objectvoid notifyOwnershipRevoked(Ownable obj)
Ownable
implementations in response to calls to Ownable.setOwner(Owner)
.
Ownership is revoked when the Ownable is assigned a new owner, or the null owner
but was previously owned by this instance.obj
- The disowned objectCopyright © 2013. All Rights Reserved.