|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.rim.device.api.command.registrar.CategoryCollection
public class CategoryCollection
Collection of category strings.
| Constructor Summary | ||
|---|---|---|
CategoryCollection()
Creates a CategoryCollection instance. |
||
CategoryCollection(String category)
Creates a CategoryCollection instance with one category. |
||
CategoryCollection(String[] categories)
Creates a CategoryCollection instance with categories contained in a specified string array. |
||
CategoryCollection(CategoryCollection categories)
Creates a CategoryCollection instance with categories contained in a specified CategoryCollection. |
||
| Method Summary | ||
|---|---|---|
boolean |
add(String category)
Adds a category to the collection. |
|
boolean |
addAll(String[] categories)
Adds all categories contained within a specified array to the collection. |
|
boolean |
addAll(CategoryCollection categories)
Adds all categories contained within a CategoryCollection to the collection. |
|
void |
clear()
Removes all categories in the collection. |
|
boolean |
contains(String category)
Determines if a category is contained within the collection. |
|
boolean |
containsAll(CategoryCollection categories)
Determines if all specified categories are contained within the collection. |
|
boolean |
containsAny(CategoryCollection categories)
Determines if any specified categories are contained within the collection. |
|
boolean |
isEmpty()
Determines if the collection is empty. |
|
boolean |
remove(String category)
Removes a specified category from the collection. |
|
boolean |
removeAll(CategoryCollection categories)
Removes all categories specified in a CategoryCollection. |
|
boolean |
retainAll(CategoryCollection categories)
Removes all categories except ones specified in a CategoryCollection. |
|
int |
size()
Returns the number of categories in the collection. |
|
String |
toString()
Returns a string representation of the collection. |
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public CategoryCollection()
CategoryCollection instance.
public CategoryCollection(String category)
CategoryCollection instance with one category.
category - Category string.
IllegalArgumentException - if category is null or empty, exceeds 255 characters,
or does not match the following regular expression: ([a-zA-Z]|_|:)[a-zA-Z0-9\.\-_:]*public CategoryCollection(CategoryCollection categories)
CategoryCollection instance with categories contained in a specified CategoryCollection.
categories - Collection of categories.public CategoryCollection(String[] categories)
CategoryCollection instance with categories contained in a specified string array.
categories - Array of categories.
IllegalArgumentException - if any of the categories in the array are null or empty, exceed 255 characters,
or do not match the following regular expression: ([a-zA-Z]|_|:)[a-zA-Z0-9\.\-_:]*| Method Detail |
|---|
public boolean add(String category)
category - Category to add.
true if the category was added, false otherwise.
IllegalArgumentException - if category is null or empty, exceeds 255 characters,
or does not match the following regular expression: ([a-zA-Z]|_|:)[a-zA-Z0-9\.\-_:]*public boolean addAll(CategoryCollection categories)
CategoryCollection to the collection.
categories - Collection of categories to add.
true if at least one category was added, false otherwise.
If categories is null then false is returned.public boolean addAll(String[] categories)
categories - Array of categories to add. If categories is null, the collection is not modified.
true if at least one category was added, false otherwise.
IllegalArgumentException - if any of the categories in the array are null or empty, exceed 255 characters,
or do not match the following regular expression: ([a-zA-Z]|_|:)[a-zA-Z0-9\.\-_:]*
If categories is null then false is returned.public void clear()
public boolean contains(String category)
category - Category to check.
true if the collection contains category, false otherwise.
IllegalArgumentException - if category is null or empty, exceeds 255 characters,
or does not match the following regular expression: ([a-zA-Z]|_|:)[a-zA-Z0-9\.\-_:]*public boolean containsAll(CategoryCollection categories)
categories - Collection of categories to check for.
true if the collection contains all the categories in categories,
false otherwise.public boolean containsAny(CategoryCollection categories)
categories - Collection of categories to check for.
true if the collection is empty, is null or contains at least one of the categories in categories,
false otherwise.public boolean isEmpty()
true if the collection is empty, false otherwise.public boolean remove(String category)
category - Category to remove.
true if the category was removed, false otherwise.
IllegalArgumentException - if category is null or empty, exceeds 255 characters,
or does not match the following regular expression: ([a-zA-Z]|_|:)[a-zA-Z0-9\.\-_:]*public boolean removeAll(CategoryCollection categories)
CategoryCollection.
categories - Categories to remove.
true if at least one category was removed, false otherwise.
If categories is null then false is returned.public boolean retainAll(CategoryCollection categories)
CategoryCollection.
categories - Categories to not remove.
true if at least one category was removed, false otherwise.
If categories is null then false is returned.public int size()
public String toString()
toString in class Object
|
|||||||||
| 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