OracleJavaScript API Reference for Oracle ADF Faces

 

SUMMARY: FIELD | CONSTR | METHOD    DETAIL: FIELD | CONSTR | METHOD

oracle.adf.view.js.base
Class AdfCollections

org.ecmascript.object.Object
   |
   +--oracle.adf.view.js.base.AdfCollections

public class AdfCollections
extends Object
Utilities for working with collections



Field Summary

public static Object
EMPTY_ARRAY


Fields inherited from org.ecmascript.object.Object

constructor, prototype


Constructor Summary

public
AdfCollections()
Utilities for working with collections


Method Summary

public static Object
addArrayKey(Object array, Object key, Object value)
Adds a value to an array at the specified key.
public static Object
clear(Object target)
Remove all of the properties of a collection
public static Object
clearArray(Object array)
Remove all of the entries from an Array
public static Object
cloneArray(Object source)
Returns a copy of an array
public static Object
copyInto(Object target, Object source, Object keyConverter)
Copies all of the properties of source into target and return the target
public static Object
copyProperties(Object target, Object source, Object sourceKeys, Object keyConverter)
Copy the properties with the specified keys from the source to the destination using the optional keyConverter to convert the source keys to target keys
public static Object
getKeyOf(Object collection, Object value)
Returns the key of the value in the specified collection, or undefined if the value is not a member of this collection.
public static Object
indexOf(Object array, Object object)
Returns the index of the object in the array, or -1 if the array does not contain the object
public static Object
isArray(Object array)
Returns true if the object is an Array
public static Object
isEmpty(Object collection)
Returns if a collection is empty
public static Object
removeAll(Object targetCollection, Object removeCollection, Object outCollection)
Removes all of the properties of removeCollection from targetCollection.
public static Object
removeArrayKey(Object array, Object key)
Removes the key from the array list if it is an integer, and from the key's properties if it isn't
public static Number
removeArrayValue(Array array, Object value)
Removes the first instance of the specified value from the Array and returns the key the value was associated with, moving all of the array indices down and returning the index of the removed value, or -1 if the value wasn't found.
public static Object
removeValue(Object collection, Object value)
Removes the first instance of the specified value from the collection and returns the key the value was associated with
public static Object
union(Object inUnion1, Object inUnion2, Object outUnion)
Returns the union of two sets of properties.


Field Detail


EMPTY_ARRAY

public static Object EMPTY_ARRAY

Constructor Detail


AdfCollections

public AdfCollections()

Utilities for working with collections

Method Detail


addArrayKey

public static Object addArrayKey(Object array,
                                 Object key,
                                 Object value)

Adds a value to an array at the specified key. If the key is an integer, the value is gently inserted into the array at that key, shifting the values with higher indices further down the array.

Parameters:
array    
key    
value    
Return:
Object

clear

public static Object clear(Object target)

Remove all of the properties of a collection

Parameters:
target    
Return:
Object

clearArray

public static Object clearArray(Object array)

Remove all of the entries from an Array

Parameters:
array    
Return:
Object

cloneArray

public static Object cloneArray(Object source)

Returns a copy of an array

Parameters:
source    
Return:
Object

copyInto

public static Object copyInto(Object target,
                              Object source,
                              Object keyConverter)

Copies all of the properties of source into target and return the target

Parameters:
target    
source    
keyConverter    
Return:
Object

copyProperties

public static Object copyProperties(Object target,
                                    Object source,
                                    Object sourceKeys,
                                    Object keyConverter)

Copy the properties with the specified keys from the source to the destination using the optional keyConverter to convert the source keys to target keys

Parameters:
target    
source    
sourceKeys    
keyConverter    
Return:
Object

getKeyOf

public static Object getKeyOf(Object collection,
                              Object value)

Returns the key of the value in the specified collection, or undefined if the value is not a member of this collection.

Parameters:
collection    
value    
Return:
Object

indexOf

public static Object indexOf(Object array,
                             Object object)

Returns the index of the object in the array, or -1 if the array does not contain the object

Parameters:
array    
object    
Return:
Object

isArray

public static Object isArray(Object array)

Returns true if the object is an Array

Parameters:
array    
Return:
Object

isEmpty

public static Object isEmpty(Object collection)

Returns if a collection is empty

Parameters:
collection  -  A collection object to test for empty
Return:
Object

removeAll

public static Object removeAll(Object targetCollection,
                               Object removeCollection,
                               Object outCollection)

Removes all of the properties of removeCollection from targetCollection. targetCollection is unmodified if targetCollection is not the same object as outCollection. If outCollection is specified, then it is cleared and populated with the results of the removal. Otherwise, a new object is created to hold the results.

Parameters:
targetCollection    
removeCollection    
outCollection    
Return:
Object

removeArrayKey

public static Object removeArrayKey(Object array,
                                    Object key)

Removes the key from the array list if it is an integer, and from the key's properties if it isn't

Parameters:
array    
key    
Return:
Object

removeArrayValue

public static Number removeArrayValue(Array array,
                                      Object value)

Removes the first instance of the specified value from the Array and returns the key the value was associated with, moving all of the array indices down and returning the index of the removed value, or -1 if the value wasn't found.

Parameters:
array  -  Array to search when removing value
value  -  Value to remove from array
Return:
Number - Index of value in array, or -1 if value wasn't found

removeValue

public static Object removeValue(Object collection,
                                 Object value)

Removes the first instance of the specified value from the collection and returns the key the value was associated with

Parameters:
collection    
value    
Return:
Object

union

public static Object union(Object inUnion1,
                           Object inUnion2,
                           Object outUnion)

Returns the union of two sets of properties. With the properties of inUnion2 taking precendence over those of inUnion1. If outUnion is specified, it will be used as the output container instead of a new object being created and returned. outUnion may be the same object as inUnion1 or inUnion2

Parameters:
inUnion1    
inUnion2    
outUnion    
Return:
Object

SUMMARY: FIELD | CONSTR | METHOD    DETAIL: FIELD | CONSTR | METHOD

 

Generated on 2011.04.27 02:28 UTC
Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.