Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ValueType

The base class of all value types.

Hierarchy

Index

Methods

clone

  • Clone the current object. The clone result of the object should be equal to the current object, i.e. satisfy this.equals(this, value.clone()). The base version of this method do nothing and returns this'. The derived class **must** rewrite this method and the returned object should not bethis, i.e. satisfythis !== this.clone()`.

    Returns ValueType

    The cloned object

equals

  • equals(other: this): boolean
  • Check whether the current object is equal to the specified object. This check should be interchangeable, i.e. satisfy this.equals(other) === other.equals(this). The base version of this method will returns `false'.

    Parameters

    • other: this

      相比较的值。

    Returns boolean

    相等则返回 true,否则返回 false

set

  • set(other: this): void
  • Set the property values of the current object with the given object. The base version of this method will returns `this' and the derived class must rewrite this method.

    Parameters

    • other: this

      The other object

    Returns void

toString

  • toString(): string
  • Convert the current object to a string. The base version of this method will returns an empty string.

    Returns string

    The string representation of the current object

Generated using TypeDoc