<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
		<id>http://wbex.ru/index.php?action=history&amp;feed=atom&amp;title=Flash_%2F_Flex_%2F_ActionScript%2FArray%2FArray_Utilties</id>
		<title>Flash / Flex / ActionScript/Array/Array Utilties - История изменений</title>
		<link rel="self" type="application/atom+xml" href="http://wbex.ru/index.php?action=history&amp;feed=atom&amp;title=Flash_%2F_Flex_%2F_ActionScript%2FArray%2FArray_Utilties"/>
		<link rel="alternate" type="text/html" href="http://wbex.ru/index.php?title=Flash_/_Flex_/_ActionScript/Array/Array_Utilties&amp;action=history"/>
		<updated>2026-04-04T18:00:59Z</updated>
		<subtitle>История изменений этой страницы в вики</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>http://wbex.ru/index.php?title=Flash_/_Flex_/_ActionScript/Array/Array_Utilties&amp;diff=4334&amp;oldid=prev</id>
		<title> в 09:19, 26 мая 2010</title>
		<link rel="alternate" type="text/html" href="http://wbex.ru/index.php?title=Flash_/_Flex_/_ActionScript/Array/Array_Utilties&amp;diff=4334&amp;oldid=prev"/>
				<updated>2010-05-26T09:19:12Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;ru&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Предыдущая&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Версия 09:19, 26 мая 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; style=&quot;text-align: center;&quot; lang=&quot;ru&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(нет различий)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
			</entry>

	<entry>
		<id>http://wbex.ru/index.php?title=Flash_/_Flex_/_ActionScript/Array/Array_Utilties&amp;diff=4335&amp;oldid=prev</id>
		<title>Admin: 1 версия</title>
		<link rel="alternate" type="text/html" href="http://wbex.ru/index.php?title=Flash_/_Flex_/_ActionScript/Array/Array_Utilties&amp;diff=4335&amp;oldid=prev"/>
				<updated>2010-05-26T08:14:41Z</updated>
		
		<summary type="html">&lt;p&gt;1 версия&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Class that contains static utility methods for manipulating and working with Arrays==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
/*&lt;br /&gt;
  Adobe Systems Incorporated(r) Source Code License Agreement&lt;br /&gt;
  Copyright(c) 2005 Adobe Systems Incorporated. All rights reserved.&lt;br /&gt;
  &lt;br /&gt;
  Please read this Source Code License Agreement carefully before using&lt;br /&gt;
  the source code.&lt;br /&gt;
  &lt;br /&gt;
  Adobe Systems Incorporated grants to you a perpetual, worldwide, non-exclusive, &lt;br /&gt;
  no-charge, royalty-free, irrevocable copyright license, to reproduce,&lt;br /&gt;
  prepare derivative works of, publicly display, publicly perform, and&lt;br /&gt;
  distribute this source code and such derivative works in source or &lt;br /&gt;
  object code form without any attribution requirements.  &lt;br /&gt;
  &lt;br /&gt;
  The name &amp;quot;Adobe Systems Incorporated&amp;quot; must not be used to endorse or promote products&lt;br /&gt;
  derived from the source code without prior written permission.&lt;br /&gt;
  &lt;br /&gt;
  You agree to indemnify, hold harmless and defend Adobe Systems Incorporated from and&lt;br /&gt;
  against any loss, damage, claims or lawsuits, including attorney&amp;quot;s &lt;br /&gt;
  fees that arise or result from your use or distribution of the source &lt;br /&gt;
  code.&lt;br /&gt;
  &lt;br /&gt;
  THIS SOURCE CODE IS PROVIDED &amp;quot;AS IS&amp;quot; AND &amp;quot;WITH ALL FAULTS&amp;quot;, WITHOUT &lt;br /&gt;
  ANY TECHNICAL SUPPORT OR ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING,&lt;br /&gt;
  BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS&lt;br /&gt;
  FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  ALSO, THERE IS NO WARRANTY OF &lt;br /&gt;
  NON-INFRINGEMENT, TITLE OR QUIET ENJOYMENT.  IN NO EVENT SHALL MACROMEDIA&lt;br /&gt;
  OR ITS SUPPLIERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,&lt;br /&gt;
  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, &lt;br /&gt;
  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;&lt;br /&gt;
  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, &lt;br /&gt;
  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR &lt;br /&gt;
  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOURCE CODE, EVEN IF&lt;br /&gt;
  ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.&lt;br /&gt;
*/&lt;br /&gt;
package com.adobe.utils&lt;br /&gt;
{&lt;br /&gt;
  &lt;br /&gt;
  /**&lt;br /&gt;
  *   Class that contains static utility methods for manipulating and working&lt;br /&gt;
  *  with Arrays.&lt;br /&gt;
  * &lt;br /&gt;
  *  Note that all APIs assume that they are working with well formed arrays.&lt;br /&gt;
  *  i.e. they will only manipulate indexed values.  &lt;br /&gt;
  * &lt;br /&gt;
  *   @langversion ActionScript 3.0&lt;br /&gt;
  *  @playerversion Flash 9.0&lt;br /&gt;
  *  @tiptext&lt;br /&gt;
  */    &lt;br /&gt;
  public class ArrayUtil&lt;br /&gt;
  {&lt;br /&gt;
        &lt;br /&gt;
    /**&lt;br /&gt;
    *  Determines whether the specified array contains the specified value.  &lt;br /&gt;
    * &lt;br /&gt;
    *   @param arr The array that will be checked for the specified value.&lt;br /&gt;
    *&lt;br /&gt;
    *  @param value The object which will be searched for within the array&lt;br /&gt;
    * &lt;br /&gt;
    *   @return True if the array contains the value, False if it does not.&lt;br /&gt;
    *&lt;br /&gt;
    *   @langversion ActionScript 3.0&lt;br /&gt;
    *  @playerversion Flash 9.0&lt;br /&gt;
    *  @tiptext&lt;br /&gt;
    */      &lt;br /&gt;
    public static function arrayContainsValue(arr:Array, value:Object):Boolean&lt;br /&gt;
    {&lt;br /&gt;
      return (arr.indexOf(value) != -1);&lt;br /&gt;
    }  &lt;br /&gt;
    &lt;br /&gt;
    /**&lt;br /&gt;
    *  Remove all instances of the specified value from the array,&lt;br /&gt;
    * &lt;br /&gt;
    *   @param arr The array from which the value will be removed&lt;br /&gt;
    *&lt;br /&gt;
    *  @param value The object that will be removed from the array.&lt;br /&gt;
    *&lt;br /&gt;
    *   @langversion ActionScript 3.0&lt;br /&gt;
    *  @playerversion Flash 9.0&lt;br /&gt;
    *  @tiptext&lt;br /&gt;
    */    &lt;br /&gt;
    public static function removeValueFromArray(arr:Array, value:Object):void&lt;br /&gt;
    {&lt;br /&gt;
      var len:uint = arr.length;&lt;br /&gt;
      &lt;br /&gt;
      for(var i:Number = len; i &amp;gt; -1; i--)&lt;br /&gt;
      {&lt;br /&gt;
        if(arr[i] === value)&lt;br /&gt;
        {&lt;br /&gt;
          arr.splice(i, 1);&lt;br /&gt;
        }&lt;br /&gt;
      }          &lt;br /&gt;
    }&lt;br /&gt;
    /**&lt;br /&gt;
    *  Create a new array that only contains unique instances of objects&lt;br /&gt;
    *  in the specified array.&lt;br /&gt;
    *&lt;br /&gt;
    *  Basically, this can be used to remove duplication object instances&lt;br /&gt;
    *  from an array&lt;br /&gt;
    * &lt;br /&gt;
    *   @param arr The array which contains the values that will be used to&lt;br /&gt;
    *  create the new array that contains no duplicate values.&lt;br /&gt;
    *&lt;br /&gt;
    *  @return A new array which only contains unique items from the specified&lt;br /&gt;
    *  array.&lt;br /&gt;
    *&lt;br /&gt;
    *   @langversion ActionScript 3.0&lt;br /&gt;
    *  @playerversion Flash 9.0&lt;br /&gt;
    *  @tiptext&lt;br /&gt;
    */  &lt;br /&gt;
    public static function createUniqueCopy(a:Array):Array&lt;br /&gt;
    {&lt;br /&gt;
      var newArray:Array = new Array();&lt;br /&gt;
      &lt;br /&gt;
      var len:Number = a.length;&lt;br /&gt;
      var item:Object;&lt;br /&gt;
      &lt;br /&gt;
      for (var i:uint = 0; i &amp;lt; len; ++i)&lt;br /&gt;
      {&lt;br /&gt;
        item = a[i];&lt;br /&gt;
        &lt;br /&gt;
        if(ArrayUtil.arrayContainsValue(newArray, item))&lt;br /&gt;
        {&lt;br /&gt;
          continue;&lt;br /&gt;
        }&lt;br /&gt;
        &lt;br /&gt;
        newArray.push(item);&lt;br /&gt;
      }&lt;br /&gt;
      &lt;br /&gt;
      return newArray;&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    /**&lt;br /&gt;
    *  Creates a copy of the specified array.&lt;br /&gt;
    *&lt;br /&gt;
    *  Note that the array returned is a new array but the items within the&lt;br /&gt;
    *  array are not copies of the items in the original array (but rather &lt;br /&gt;
    *  references to the same items)&lt;br /&gt;
    * &lt;br /&gt;
    *   @param arr The array that will be copies&lt;br /&gt;
    *&lt;br /&gt;
    *  @return A new array which contains the same items as the array passed&lt;br /&gt;
    *  in.&lt;br /&gt;
    *&lt;br /&gt;
    *   @langversion ActionScript 3.0&lt;br /&gt;
    *  @playerversion Flash 9.0&lt;br /&gt;
    *  @tiptext&lt;br /&gt;
    */      &lt;br /&gt;
    public static function copyArray(arr:Array):Array&lt;br /&gt;
    {  &lt;br /&gt;
      return arr.slice();&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    /**&lt;br /&gt;
    *  Compares two arrays and returns a boolean indicating whether the arrays&lt;br /&gt;
    *  contain the same values at the same indexes.&lt;br /&gt;
    * &lt;br /&gt;
    *   @param arr1 The first array that will be compared to the second.&lt;br /&gt;
    *&lt;br /&gt;
    *   @param arr2 The second array that will be compared to the first.&lt;br /&gt;
    *&lt;br /&gt;
    *  @return True if the arrays contains the same values at the same indexes.&lt;br /&gt;
      False if they do not.&lt;br /&gt;
    *&lt;br /&gt;
    *   @langversion ActionScript 3.0&lt;br /&gt;
    *  @playerversion Flash 9.0&lt;br /&gt;
    *  @tiptext&lt;br /&gt;
    */    &lt;br /&gt;
    public static function arraysAreEqual(arr1:Array, arr2:Array):Boolean&lt;br /&gt;
    {&lt;br /&gt;
      if(arr1.length != arr2.length)&lt;br /&gt;
      {&lt;br /&gt;
        return false;&lt;br /&gt;
      }&lt;br /&gt;
      &lt;br /&gt;
      var len:Number = arr1.length;&lt;br /&gt;
      &lt;br /&gt;
      for(var i:Number = 0; i &amp;lt; len; i++)&lt;br /&gt;
      {&lt;br /&gt;
        if(arr1[i] !== arr2[i])&lt;br /&gt;
        {&lt;br /&gt;
          return false;&lt;br /&gt;
        }&lt;br /&gt;
      }&lt;br /&gt;
      &lt;br /&gt;
      return true;&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
        &amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	</feed>