abstract class IdentifiableEntity extends Identifiable
Represent any entity that must have its own valid global unique identifier (GUID) to be functional.
The basic design philosophy of the workflow of a GUID at this stage is a deterministic state machine.
At the start, an Exception
will be thrown while the default conditions of the accessor and mutator are maintained.
("The ability to set a new valid GUID".)
Only a valid GUID may be set and, once it does, that changes the conditions of the accessor and mutator
to one where it will return the valid GUID and one where it will no longer accept a new GUID (valid or invalid).
That GUID will continue being the GUID reported by the object, even if another valid GUID tries to be set.
(No error or exception will be thrown.)
To set a new GUID, the current one must be invalidated with the appropriate function,
and this turns both the object and any object reference that can be acquired from the object "stale."
Doing this prior to setting the initial valid GUID is fruitless
as it restores the object to its default mutation option ("the ability to set a new valid GUID").
Access to the GUID is retained.
This can be done as many times as is necessary by following the same order of actions.
The "staleness" of the object and the "staleness" of the GUID are related.
The condition in general indicates that the object has somehow become externally disconnected from its GUID reference
though the two still share something similar to their prior relationship internally.
Do not expect a "stale" GUID to refer to the same object through some mapping mechanism.
Do not expect a "stale" object to give you a GUID that will map back to itself.
- Source
- IdentifiableEntity.scala
- Exceptions thrown
`NoGUIDException`
if a GUID has not yet been assigned
- Alphabetic
- By Inheritance
- IdentifiableEntity
- Identifiable
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new IdentifiableEntity()
- Exceptions thrown
`NoGUIDException`
if a GUID has not yet been assigned
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def GUID: PlanetSideGUID
- Definition Classes
- IdentifiableEntity → Identifiable
- def GUID_=(guid: PlanetSideGUID): PlanetSideGUID
- Definition Classes
- IdentifiableEntity → Identifiable
- def GUID_=(guid: StalePlanetSideGUID): PlanetSideGUID
Always intercept
StalePlanetSideGUID
references when attempting to mutate the GUID value.Always intercept
StalePlanetSideGUID
references when attempting to mutate the GUID value.- guid
the valid GUID to assign
- returns
never returns
- Exceptions thrown
`AssigningGUIDException`
always
- def HasGUID: Boolean
Flag when the object has no GUID (initial condition) or is considered stale.
Flag when the object has no GUID (initial condition) or is considered stale.
- returns
whether the value of the GUID is a valid representation for this object
- def Invalidate(): Unit
Indicate that the current GUID is no longer a valid representation of the object.
Indicate that the current GUID is no longer a valid representation of the object. Transforms whatever the current GUID is into a
StalePlanetSideGUID
entity with the same value. Doing this restores the object to its default mutation option ("the ability to set a new valid GUID"). The current GUID will still be accessed as if it were valid, but it will be wrapped in the new stale object. - final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()