ObjectUtils

Kind of class:class
Inherits from:none
Author:Martijn de Visser
Classpath:org.asapframework.util.ObjectUtils
File last modified:Thursday, 12 October 2006, 11:19:40
A collection of Object utility functions.

Summary


Class properties
Class methods
  • clone (inObj:Object) : Object
    • Clones an object with all its properties (without a reference to the original object).
  • compare (inObj1:Object, inObj2:Object) : Boolean
    • Compares two objects.
  • traceObject (obj:Object, inMaxDepth:Number, inOpenChar:String, isInited:Boolean, openChar:String, tabs:String) : Void
    • Recursively traces the properties of an object

Class properties

sCloseChar

static private sCloseChar:String
(read)

Class methods

clone

static function clone (
inObj:Object) : Object

Clones an object with all its properties (without a reference to the original object).
Parameters:
inObj:
Object to clone
Returns:
  • The cloned object.

compare

static function compare (
inObj1:Object, inObj2:Object) : Boolean

Compares two objects. Please note: this is simple, first setup. Comparing primitives returns true, even if not similar.
Parameters:
inObj1:
first object to compare
inObj2:
second object to compare
Returns:
  • Boolean, true if objects are similar, false if not.

traceObject

static function traceObject (
obj:Object, inMaxDepth:Number, inOpenChar:String, isInited:Boolean, openChar:String, tabs:String) : Void

Recursively traces the properties of an object
Parameters:
obj:
object to trace
To do:
  • Rewrite so this function returns a string (for usage with Console)
  • BUG: The first { is not printed. Probably due to conversion to static method.