Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ValueType

所有值类型的基类。

Hierarchy

Index

Methods

clone

  • 克隆当前值。克隆的结果值应与当前值相等,即满足 this.equals(this, value.clone())。 本方法的基类版本简单地返回 this; 派生类必须重写本方法,并且返回的对象不应当为 this,即满足 this !== this.clone()

    Returns ValueType

    The cloned object

equals

  • equals(other: this): boolean
  • 判断当前值是否与指定值相等。此判断应当具有交换性,即满足 this.equals(other) === other.equals(this)。 本方法的基类版本简单地返回 false

    Parameters

    • other: this

      相比较的值。

    Returns boolean

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

set

  • set(other: this): void
  • 赋值当前值使其与指定值相等。 本方法的基类版本简单地返回 this,派生类必须重写本方法。

    Parameters

    • other: this

      The other object

    Returns void

toString

  • toString(): string
  • 返回当前值的字符串表示。 本方法的基类版本返回空字符串。

    Returns string

    The string representation of the current object

Generated using TypeDoc