Packagejp.nium.utils
Classpublic final class ObjectUtil
InheritanceObjectUtil Inheritance Object

ObjectUtil クラスは、オブジェクト操作のためのユーティリティクラスです。 ObjectUtil クラスを直接インスタンス化することはできません。 new ObjectUtil() コンストラクタを呼び出すと、ArgumentError 例外がスローされます。 The ObjectUtil class is an utility class for object operation. ObjectUtil class can not instanciate directly. When call the new ObjectUtil() constructor, the ArgumentError exception will be thrown.



Public Methods
 MethodDefined By
  
clone(target:Object):Object
[static] 指定されたオブジェクトを複製して返します。 Returns the copy of the specified object.
ObjectUtil
  
length(target:Object):int
[static] 指定されたオブジェクトに設定されているプロパティ数を返します。 Returns the number of the property of the specified object.
ObjectUtil
  
setProperties(target:Object, props:Object):void
[static] 対象オブジェクトのプロパティを一括設定します。 Set the whole property of the object.
ObjectUtil
  
toQueryString(query:Object):String
[static] 指定されたオブジェクトのクエリーストリング表現を返します。 Returns the query string expression of the specified object.
ObjectUtil
  
toString(target:Object):String
[static] 指定されたオブジェクトのストリング表現を返します。 Returns the string expression of the specified object.
ObjectUtil
Method Detail
clone()method
public static function clone(target:Object):Object

指定されたオブジェクトを複製して返します。 Returns the copy of the specified object.

Parameters

target:Object対象のオブジェクトです。 The object to copy.

Returns
Object複製されたオブジェクトです。 The copied object.

Example
         
length()method 
public static function length(target:Object):int

指定されたオブジェクトに設定されているプロパティ数を返します。 Returns the number of the property of the specified object.

Parameters

target:Object対象のオブジェクトです。 The object to check.

Returns
intオブジェクトに設定されているプロパティ数です。 The property count of the object.

Example
         var o:Object = { a:"A", b:"B", c:"C" };
         trace( ObjectUtil.length( o ) ); // 3
         o.d = "D";
         o.e = "E";
         trace( ObjectUtil.length( o ) ); // 5
         
setProperties()method 
public static function setProperties(target:Object, props:Object):void

対象オブジェクトのプロパティを一括設定します。 Set the whole property of the object.

Parameters

target:Object一括設定したいオブジェクトです。 The object to set.
 
props:Object設定したいプロパティを含んだオブジェクトです。 The object that contains the property to setup.


Example
         
toQueryString()method 
public static function toQueryString(query:Object):String

指定されたオブジェクトのクエリーストリング表現を返します。 Returns the query string expression of the specified object.

Parameters

query:Object対象のオブジェクトです。 The object to get the query string.

Returns
Stringオブジェクトのクエリーストリング表現です。 The query string expression of the object.

Example
         var o:Object = { a:"A", b:"B", c:"C" };
         trace( ObjectUtil.toQueryString( o ) ); // c=C&a=A&b=B
         
toString()method 
public static function toString(target:Object):String

指定されたオブジェクトのストリング表現を返します。 Returns the string expression of the specified object.

Parameters

target:Object対象のオブジェクトです。 The object to get the string expression.

Returns
Stringオブジェクトのストリング表現です。 The string expression of the object.

Example
         var o:Object = { a:"A", b:"B", c:"C" };
         trace( ObjectUtil.toString( o ) ); // {c:"C", a:"A", b:"B"}