topical media & game development

talk show tell print

lib-as-de-polygonal-ds-Collection.ax

lib-as-de-polygonal-ds-Collection.ax (swf ) [ flash ] flex


  
Copyright (c) Michael Baczynski 2007 http://lab.polygonal.de/ds/ This software is distributed under licence. Use of this software implies agreement with all terms and conditions of the accompanying software licence.

  
  package de.polygonal.ds
  {
          import de.polygonal.ds.Iterator;
          
          
A 'java-style' collection interface.

  
          public interface @ax-lib-as-de-polygonal-ds-Collection
          {
                  
Searches the collection for a matching item.
returns: True if the item exists, otherwise false.

  
                  function contains(obj:*):Boolean
                  
                  
Clears all items.

  
                  function clear():void
                  
                  
Initializes an iterator object pointing to the first item in the collection.
returns: An iterator object.

  
                  function getIterator():Iterator
                  
                  
The total number of items.
returns: The size.

  
                  function get size():int;
                  
                  
Checks if the collection is empty.
returns: True if empty, otherwise false.

  
                  function isEmpty():Boolean
                  
                  
Converts the collection into an array.
returns: An array.

  
                  function toArray():Array
          }
  }
  
  


(C) Æliens 20/2/2008

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.