com.aptana.ide.editor.js.runtime
Class OrderedObjectCollection

java.lang.Object
  extended by com.aptana.ide.editor.js.runtime.OrderedObjectCollection

public class OrderedObjectCollection
extends java.lang.Object

Author:
Kevin Lindsey

Constructor Summary
OrderedObjectCollection()
           
 
Method Summary
 void add(IObject object, int fileIndex)
          Add the specified command node to the collection
 OrderedObject get(int index)
          Retrieve the IObject at the specified index
 int getFloorFileIndex(int fileIndex, int offset)
          Return the file index of the object at or just before the specified file index and offset
 IObject getFloorObject(int fileIndex, int offset)
          Return the object at or just before the specified file index and offset
 void remove(int index)
          Remove the OrderedObject at the specified index
 void remove(int fileIndex, int offset)
          Remove the command node at the specified file index and offset.
 int size()
          Get the number of command nodes in this collection
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OrderedObjectCollection

public OrderedObjectCollection()
Method Detail

get

public OrderedObject get(int index)
Retrieve the IObject at the specified index

Parameters:
index - The index to retrieve from this collection
Returns:
Returns the IObject at the specified index

size

public int size()
Get the number of command nodes in this collection

Returns:
Returns the size of this collection

add

public void add(IObject object,
                int fileIndex)
Add the specified command node to the collection

Parameters:
object - The new node to add to this collection
fileIndex - The file index

getFloorObject

public IObject getFloorObject(int fileIndex,
                              int offset)
Return the object at or just before the specified file index and offset

Parameters:
fileIndex - The file index
offset - The offset within the file
Returns:
Returns the object at or just before the specified file index and offset

getFloorFileIndex

public int getFloorFileIndex(int fileIndex,
                             int offset)
Return the file index of the object at or just before the specified file index and offset

Parameters:
fileIndex - The file index
offset - The offset within the file
Returns:
Returns the file index of the object at or just before the specified file index and offset

remove

public void remove(int index)
Remove the OrderedObject at the specified index

Parameters:
index - The index of the element to remove from this collection

remove

public void remove(int fileIndex,
                   int offset)
Remove the command node at the specified file index and offset.

Parameters:
fileIndex - The file index
offset - The file offset