Abstract Class: Identifier<T>
Value-object base for strongly typed entity identifiers.
Subclasses implement validate; toString() converts the wrapped value with String.
Extends
ValueObject<T>
Type Parameters
T
T = string
Constructors
Constructor
new Identifier<
T>(value):Identifier<T>
Initializes a new instance of the ValueObject class.
Parameters
value
T
The value for the value object.
Returns
Identifier<T>
Inherited from
Properties
_value
protectedreadonly_value:T
Inherited from
Accessors
value
Get Signature
get value():
Readonly<T>
Gets the value for the value object.
Returns
Readonly<T>
The value for the value object.
Inherited from
Methods
equals()
equals(
vo):boolean
Determines whether the current value object is equal to another value object of the same type.
Parameters
vo
ValueObject<T>
The other value object to compare with.
Returns
boolean
True if the value objects are equal; otherwise, false.
Inherited from
toString()
toString():
string
Converts the identifier to a string representation.
Returns
string
The string representation of the identifier.
Overrides
validate()
abstractprotectedvalidate(value):void
Validates the value for the value object.
Parameters
value
T
The value to validate.
Returns
void