C# 클래스 Jurassic.TypeComparer

Implements the JavaScript equality and comparison rules.
파일 보기 프로젝트 열기: paulbartrum/jurassic

공개 메소드들

메소드 설명
Equals ( object x, object y ) : bool

Compares two objects for equality. Used by the equality operator (==).

GreaterThan ( object x, object y ) : bool

Determines the ordering of two objects. Used by the greater than operator (>).

GreaterThanOrEqual ( object x, object y ) : bool

Determines the ordering of two objects. Used by the greater than or equal operator (>=).

LessThan ( object x, object y ) : bool

Determines the ordering of two objects. Used by the less than operator (<).

LessThanOrEqual ( object x, object y ) : bool

Determines the ordering of two objects. Used by the less than or equal operator (<=).

SameValue ( object x, object y ) : bool

Implements the SameValue algorithm.

With this algorithm: 1. NaN is considered equal to NaN. 2. +0 and -0 are considered to be different.

SameValueZero ( object x, object y ) : bool

Implements the SameValueZero algorithm.

With this algorithm: 1. NaN is considered equal to NaN. 2. +0 and -0 are considered to be equal.

StrictEquals ( object x, object y ) : bool

Compares two objects for equality. Used by the strict equality operator (===).

With this algorithm: 1. NaN is not considered equal to NaN. 2. +0 and -0 are considered to be equal.

메소드 상세

Equals() 공개 정적인 메소드

Compares two objects for equality. Used by the equality operator (==).
public static Equals ( object x, object y ) : bool
x object The first object to compare.
y object The first object to compare.
리턴 bool

GreaterThan() 공개 정적인 메소드

Determines the ordering of two objects. Used by the greater than operator (>).
public static GreaterThan ( object x, object y ) : bool
x object The first object to compare.
y object The second object to compare.
리턴 bool

GreaterThanOrEqual() 공개 정적인 메소드

Determines the ordering of two objects. Used by the greater than or equal operator (>=).
public static GreaterThanOrEqual ( object x, object y ) : bool
x object The first object to compare.
y object The second object to compare.
리턴 bool

LessThan() 공개 정적인 메소드

Determines the ordering of two objects. Used by the less than operator (<).
public static LessThan ( object x, object y ) : bool
x object The first object to compare.
y object The second object to compare.
리턴 bool

LessThanOrEqual() 공개 정적인 메소드

Determines the ordering of two objects. Used by the less than or equal operator (<=).
public static LessThanOrEqual ( object x, object y ) : bool
x object The first object to compare.
y object The second object to compare.
리턴 bool

SameValue() 공개 정적인 메소드

Implements the SameValue algorithm.
With this algorithm: 1. NaN is considered equal to NaN. 2. +0 and -0 are considered to be different.
public static SameValue ( object x, object y ) : bool
x object The first object to compare.
y object The second object to compare.
리턴 bool

SameValueZero() 공개 정적인 메소드

Implements the SameValueZero algorithm.
With this algorithm: 1. NaN is considered equal to NaN. 2. +0 and -0 are considered to be equal.
public static SameValueZero ( object x, object y ) : bool
x object The first object to compare.
y object The second object to compare.
리턴 bool

StrictEquals() 공개 정적인 메소드

Compares two objects for equality. Used by the strict equality operator (===).
With this algorithm: 1. NaN is not considered equal to NaN. 2. +0 and -0 are considered to be equal.
public static StrictEquals ( object x, object y ) : bool
x object The first object to compare.
y object The second object to compare.
리턴 bool