lib-flex-book-com-rubenswieringa-utils-ArrayTool.ax (swf ) [ flash ] flex
Provides additional functionality for Arrays. @author Ruben Swieringa ruben.swieringa@gmail.com www.rubenswieringa.com www.rubenswieringa.com/blog @version 1.0.0 @see MathTool edit 2 Before modifying and/or redistributing this class, please contact Ruben Swieringa (ruben.swieringa@gmail.com). View code documentation at: http://www.rubenswieringa.com/code/as3/flex/@file/docs/ *
Constructor. @private
Adjusts all values in an Array. @param array Array whose values to adjust @param value Value with which to increase, decrease, multiply, or divide a value from array with @param operator Indicates how to adjust a value from array (addition, minus, multiplication, or division) @see MathTool#PLUS @see MathTool#MINUS @see MathTool#MULTIPLICATION @see MathTool#DIVISION @return Array with adjusted values
Similar to ArrayUtil.getItemIndex(), this method searches an Array for an Object with a given property that has a certain value. Can also search for nested Objects.<br /><br /> @example The following code returns 2:<br /><br /> <code>var array:Array = [ {foo: {bar: 'value1'}}, {foo: {bar: 'value2'}}, {foo: {bar: 'value3'}} ];<br /> var propChain:Array = ['foo', 'bar'];<br /> var value:String = 'value3';<br /> @ax-lib-flex-book-com-rubenswieringa-utils-ArrayTool.getValueMatchIndex (array, propChain, value); // outputs 2</code> @param array Array to search. @param property Property or property-chain to try every item in the Array for. This parameter can either be a String (normal property), Array (property-chain), or numeric value (array index). @param value Value to be found. @return Index of the item where the value was found on the end of the property chain.
Returns a shallow copy of an Array. @param source Array to be copied. @param Copied Array. @see http://livedocs.adobe.com/flex/201/html/10_Lists_of_data_166_5.html *
(C) Æliens 18/6/2009
You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.