Access keys

ObjectUtil

Kind of class: class
Inherits from: none
Version: 02/11/07
Author: Aaron Clinger, David Nelson
Classpath: org.casaframework.util.ObjectUtil
File last modified: Monday, 12 February 2007, 09:13:59

Summary

Class methods

clone

static function clone (
obj:Object) : Object
Makes a clone of the original Object.
Parameters:
obj:
Object to make the clone of.
Returns:
Returns a duplicate Object.

contains

static function contains (
obj:Object, member:Object) : Boolean
Searches the first level properties of an object for a another object.
Parameters:
obj :
Object to search in.
member:
Object to search for.
Returns:
Returns true if object was found; otherwise false.

isEmpty

static function isEmpty (
obj:Object) : Boolean
Determines if object contains no value(s).
Parameters:
obj:
Object to derimine if empty.
Returns:
Returns true if object is empty; otherwise false.
Usage:
var testArray:Array   = new Array();
var testString:String = '';
var testObject:Object = new Object();

trace(ObjectUtil.isEmpty(testArray));  // traces "true"
trace(ObjectUtil.isEmpty(testObject)); // traces "true"
trace(ObjectUtil.isEmpty(testString)); // traces "true"

isNull

static function isNull (
obj:Object) : Boolean
Uses the strict equality operator to determine if object is null.
Parameters:
obj:
Object to determine if null.
Returns:
Returns true if object is null; otherwise false.

isUndefined

static function isUndefined (
obj:Object) : Boolean
Uses the strict equality operator to determine if object is undefined.
Parameters:
obj:
Object to determine if undefined.
Returns:
Returns true if object is undefined; otherwise false.