Class ValueObjectAbstract<Type>Abstract

Abstract class for representing an object value

Export

Abstract

Since

1.0.0

Version

1.0.0

License

MIT

Author

Julian Andres Lasso Figueroa julian.lasso@sofka.com.co

Type Parameters

  • Type

    Type of value represented by the value object

Hierarchy

  • ValueObjectAbstract

Constructors

Properties

Value Object Error Stack

Memberof

ValueObjectAbstract

_value: Type

Value of the Value Object

Memberof

ValueObjectAbstract

Accessors

  • set value(value: Type): void
  • Sets the value for the value object, resets the error stack, and validates the new value

    Memberof

    ValueObjectBase

    Parameters

    • value: Type

    Returns void

Methods

  • Returns true if there are validation errors, false otherwise

    Returns

    True if there are validation errors, false otherwise

    Memberof

    ValueObjectBase

    Returns boolean

  • Return true if the value object has a value, false otherwise

    Returns

    {boolean} - True if the value object has a value, false otherwise

    Memberof

    ValueObjectAbstract

    Returns boolean

  • Validates the value of the value object. This method must be implemented in the derived classes

    Abstract

    Memberof

    ValueObjectBase

    Returns void

  • Private

    Verify if the value object has any errors

    Throws

    Throws an exception with the value object errors if it has any

    Memberof

    ValueObjectAbstract

    Returns void

Generated using TypeDoc