Home Reference Source
public class | source

ObjectUtil

Extends:

TypedObject → ObjectUtil

The ObjectUtil class is an all-static class with methods for working with Objects within Flex. You do not create instances of ObjectUtil; instead you simply call static methods such as the ObjectUtil.isSimple() method.

Static Method Summary

Static Public Methods
public static

dateCompare(a: *, b: *): *

Compares the two Date objects and returns an integer value indicating if the first Date object is before, equal to, or after the second item.

public static

isSimple(value: *): *

Returns true if the object reference specified is a simple data type.

public static

numericCompare(a: *, b: *): *

Compares two numeric values.

public static

stringCompare(a: *, b: *, caseInsensitive: *): *

Compares two String values.

Method Summary

Public Methods
public

Inherited Summary

From class TypedObject
public

typeCache: {}

public
public

Returns a list of strings that represent the object hierarchy for this object.

public

Returns true if the class name to check is in the list of class names defined for this class.

Static Public Methods

public static dateCompare(a: *, b: *): * source

Compares the two Date objects and returns an integer value indicating if the first Date object is before, equal to, or after the second item.

Params:

NameTypeAttributeDescription
a *

Date object.

b *

Date object.

Return:

*

0 if a and b are equal (or both are null); -1 if a is before b (or b is null); 1 if a is after b (or a is null).

public static isSimple(value: *): * source

Returns true if the object reference specified is a simple data type. The simple data types include the following:

  • String
  • Number
  • uint
  • int
  • Boolean
  • Date
  • Array

Params:

NameTypeAttributeDescription
value *

Object inspected.

Return:

*

true if the object specified is one of the types above; false otherwise.

public static numericCompare(a: *, b: *): * source

Compares two numeric values.

Params:

NameTypeAttributeDescription
a *

First number.

b *

Second number.

Return:

*

0 is both numbers are NaN. 1 if only a is a NaN. -1 if only b is a NaN. -1 if a is less than b. 1 if a is greater than b.

public static stringCompare(a: *, b: *, caseInsensitive: *): * source

Compares two String values.

Params:

NameTypeAttributeDescription
a *

First String value.

b *

Second String value.

caseInsensitive *

Specifies to perform a case insensitive compare, true, or not, false.

Return:

*

0 is both Strings are null. 1 if only a is null. -1 if only b is null. -1 if a precedes b. 1 if b precedes a.

Public Methods

public getClassNames(): string[] source

Returns a list of strings that represent the object hierarchy for this object.

Override:

TypedObject#getClassNames

Return:

string[]