|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.util.Vector
net.rim.device.api.lbs.maps.utils.MappableVector
public class MappableVector
Represents a vector of Mappable objects.
| Field Summary |
|---|
| Fields inherited from class java.util.Vector |
|---|
capacityIncrement, elementCount, elementData |
| Constructor Summary | ||
|---|---|---|
MappableVector()
Constructs a new MappableVector instance. |
||
MappableVector(int initialCapacity)
Constructs a new MappableVector instance using the initial
capacity of the vector. |
||
MappableVector(int initialCapacity,
int capacityIncrement)
Constructs a new MappableVector instance using the initial
capacity and capacity increment for the vector. |
||
MappableVector(Mappable[] data)
Constructs a copy of a MappableVector instance using the
specified array. |
||
| Method Summary | ||
|---|---|---|
void |
addAllMappables(Vector collection)
Adds all objects that are of type Mappable in the given collection. |
|
void |
addAllMappables(Mappable[] data)
Adds all objects in the given array to this collection. |
|
void |
addElement(Object element)
Adds the specified component to the end of this vector, increasing its size by one. |
|
LatLonRectangle |
getBoundingBox()
|
|
void |
insertElementAt(Object element,
int index)
Inserts the specified object as a component in this vector at the specified index. |
|
Mappable |
mappableAt(int index)
Retrieves the Mappable entity at the given index. |
|
void |
setElementAt(Object element,
int index)
Sets the component at the specified index of this
vector to be the specified object. |
|
| Methods inherited from class java.util.Vector |
|---|
capacity, contains, copyInto, elementAt, elements, ensureCapacity, firstElement, indexOf, indexOf, isEmpty, lastElement, lastIndexOf, lastIndexOf, removeAllElements, removeElement, removeElementAt, setSize, size, toString, trimToSize |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public MappableVector()
MappableVector instance.
public MappableVector(int initialCapacity)
MappableVector instance using the initial
capacity of the vector.
initialCapacity - The initial capacity of the vector.
public MappableVector(int initialCapacity,
int capacityIncrement)
MappableVector instance using the initial
capacity and capacity increment for the vector.
initialCapacity - the initial capacity of the vector.capacityIncrement - The amount by which the capacity is
increased when the vector overflows.public MappableVector(Mappable[] data)
MappableVector instance using the
specified array.
data - An array of mappable items to initially populate this
vector with.| Method Detail |
|---|
public void addElement(Object element)
Vector
addElement in class Vectorelement - the component to be added.Vector.addElement(Object)
public void insertElementAt(Object element,
int index)
Vectorindex. Each component in this vector with
an index greater or equal to the specified index is
shifted upward to have an index one greater than the value it had
previously.
The index must be a value greater than or equal to 0
and less than or equal to the current size of the vector.
insertElementAt in class Vectorelement - the component to insert.index - where to insert the new component.Vector.insertElementAt(Object, int)
public void setElementAt(Object element,
int index)
Vectorindex of this
vector to be the specified object. The previous component at that
position is discarded.
The index must be a value greater than or equal to 0
and less than the current size of the vector.
setElementAt in class Vectorelement - what the component is to be set to.index - the specified index.Vector.setElementAt(Object, int)public LatLonRectangle getBoundingBox()
Boxable.getBoundingBox()public Mappable mappableAt(int index)
elementAt(int) with the exception that
the return is of type Mappable.
index - The index for the Mappable entity.
public void addAllMappables(Vector collection)
Mappable in the given collection.
For elements that are not mappable, they are not added to this
collection.
collection - The collection to add all Mappable objects.public void addAllMappables(Mappable[] data)
data - The data for the array of Mappable items.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright 1999-2010 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark of Sun Microsystems, Inc.