|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.rim.device.api.lbs.maps.model.AbstractMappable
net.rim.device.api.lbs.maps.model.geospatial.GsFolder
public class GsFolder
Represents a folder that contains 0 or more GsElement elements.
| Constructor Summary | ||
|---|---|---|
GsFolder()
Constructs a new instance of GsFolder. |
||
GsFolder(String name,
String description)
Constructs an empty GsFolder with the given name and description. |
||
GsFolder(String name,
String description,
GsElement[] elements)
Constructs a GsFolder with the given name and description containing the given elements. |
||
| Method Summary | ||
|---|---|---|
void |
addElement(GsElement obj)
Adds the given element to this folder. |
|
void |
addElements(GsElement[] elements)
Adds the given elements to this folder. |
|
GsElementEnumeration |
elements()
Retrieves an enumeration of the elements contained in this folder. |
|
boolean |
equals(Object obj)
Indicates whether some other object is "equal to" this one. |
|
boolean |
equalsHierarchically(GsElement obj)
Determines equality of this element and another element based on the element's attributes and parent. |
|
boolean |
equalsNode(GsElement obj)
Determines equality of this element and another element based on the element's attributes, but not the element's parents. |
|
LatLonRectangle |
getBoundingBox()
Retrieves the latitude and longitude-based bounding box of this mappable item. |
|
String |
getDescription()
Retrieves the description of this element. |
|
GsElement |
getElementAt(int index)
Retrieves the element at the given index. |
|
String |
getName()
Retrieves the name of this element. |
|
GsFolder |
getParent()
Retrieves the parent folder of this element. |
|
int |
hashCode()
Returns a hash code value for the object. |
|
void |
insertElementAt(GsElement obj,
int index)
Inserts the given element into the folder at the given index. |
|
boolean |
isClusterable()
Determines if the mappable object can be grouped with other clusterable points of interest. |
|
void |
removeAllElements()
Removes all elements from the folder. |
|
boolean |
removeElement(GsElement obj)
Removes the given element from this folder. |
|
void |
removeElementAt(int index)
Removes the element at the given index from this folder. |
|
void |
setDescription(String description)
Sets the description of this folder. |
|
void |
setElementAt(GsElement obj,
int index)
Replaces the element at the given index with the supplied element. |
|
void |
setName(String name)
Sets the name of this folder. |
|
void |
setParent(GsFolder parent)
Sets the parent folder of this element. |
|
int |
size()
Retrieves the number of elements this folder contains. |
|
| Methods inherited from class net.rim.device.api.lbs.maps.model.AbstractMappable |
|---|
getCommandsByType, getStyleId, match, setStyleId |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface net.rim.device.api.lbs.maps.model.Mappable |
|---|
getStyleId |
| Constructor Detail |
|---|
public GsFolder()
GsFolder.
public GsFolder(String name,
String description)
GsFolder with the given name and description.
name - The name of the folder.description - The description of the folder.
public GsFolder(String name,
String description,
GsElement[] elements)
GsFolder with the given name and description containing the given elements.
name - The name of the folder.description - The description of the folder.elements - The elements to put in this folder.| Method Detail |
|---|
public String getName()
GsElement
getName in interface GsElementpublic void setName(String name)
name - the namepublic String getDescription()
GsElement
getDescription in interface GsElementpublic void setDescription(String description)
description - the descriptionpublic GsFolder getParent()
GsElement
getParent in interface GsElementpublic void setParent(GsFolder parent)
GsElement
setParent in interface GsElementparent - The parent folder of this element.public void addElement(GsElement obj)
obj - The element to add.public void addElements(GsElement[] elements)
elements - The elements to add to this folder.public LatLonRectangle getBoundingBox()
BoxableNote: It's recommended that for classes that implement
Boxable that the bounding box calculation be performed at request
time, and not at modification time. When there are multiple modifications to
perform, continuous recalculation of the bounding box is unnecessary.
It's also recommended that you cache the bounding box information once it's been calculated because requests for the bounding box may be frequent.
getBoundingBox in interface Boxablenull if
there is no bounding box.public boolean isClusterable()
Mappable
isClusterable in interface MappableisClusterable in class AbstractMappabletrue if the mappable object is clusterable,
false otherwise.
public void insertElementAt(GsElement obj,
int index)
obj - The element to add.index - The index to add the element at.
ArrayIndexOutOfBoundsException - if the index is invalid.public void removeAllElements()
public boolean removeElement(GsElement obj)
obj - The element to remove.
true if the element was removed from the folder, false otherwise.public void removeElementAt(int index)
index - The index of the element to remove.
ArrayIndexOutOfBoundsException - if the index is invalid.
public void setElementAt(GsElement obj,
int index)
obj - The new element.index - The index of the element to replace.
ArrayIndexOutOfBoundsException - if the index is invalid.public GsElement getElementAt(int index)
index - The index of the element to retrieve.
public int size()
public GsElementEnumeration elements()
public int hashCode()
Objectjava.util.Hashtable.
The general contract of hashCode is:
hashCode method on each of
the two objects must produce the same integer result.
Object.equals(java.lang.Object)
method, then calling the hashCode method on each of the
two objects must produce distinct integer results. However, the
programmer should be aware that producing distinct integer results
for unequal objects may improve the performance of hashtables.
As much as is reasonably practical, the hashCode method defined by class Object does return distinct integers for distinct objects. (This is typically implemented by converting the internal address of the object into an integer, but this implementation technique is not required by the JavaTM programming language.)
hashCode in class AbstractMappableObject.equals(java.lang.Object),
Hashtablepublic boolean equalsNode(GsElement obj)
GsElement
equalsNode in interface GsElementobj - The GsElement to compare to.
true if the elements are equal, false
otherwise.public boolean equalsHierarchically(GsElement obj)
GsElement
equalsHierarchically in interface GsElementobj - The GsElement to compare to.
true if the elements are equal and have the same
parent, false otherwise.public boolean equals(Object obj)
Object
The equals method implements an equivalence relation:
x,
x.equals(x) should return true.
x and
y, x.equals(y) should return
true if and only if y.equals(x) returns
true.
x,
y, and z, if x.equals(y)
returns true and y.equals(z) returns
true, then x.equals(z) should return
true.
x
and y, multiple invocations of x.equals(y)
consistently return true or consistently return
false, provided no information used in
equals comparisons on the object is modified.
x,
x.equals(null) should return false.
The equals method for class Object implements
the most discriminating possible equivalence relation on objects;
that is, for any reference values x and y,
this method returns true if and only if x and
y refer to the same object (x==y has the
value true).
equals in class AbstractMappableobj - the reference object with which to compare.
true if this object is the same as the obj
argument; false otherwise.Boolean.hashCode(),
Hashtable
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright 1999-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal