net.rim.device.api.command.registrar
Class NullCategoryCollection

java.lang.Object
  extended by net.rim.device.api.command.registrar.CategoryCollection
      extended by net.rim.device.api.command.registrar.NullCategoryCollection

public final class NullCategoryCollection
extends CategoryCollection

Null Object implementation of CategoryCollection as a stateless singleton. All methods that mutate a CategoryCollection are overridden in this class and do not modify the object.

Since:
BlackBerry API 6.0.0

Method Summary
 boolean add(String category)
          Does not add the specified category.
 boolean addAll(String[] categories)
          Does not add all the specified categories.
 boolean addAll(CategoryCollection categories)
          Does not add all the specified categories.
static NullCategoryCollection getInstance()
          Returns a singleton instance.
 
Methods inherited from class net.rim.device.api.command.registrar.CategoryCollection
clear, contains, containsAll, containsAny, isEmpty, remove, removeAll, retainAll, size, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 



Method Detail

getInstance

public static NullCategoryCollection getInstance()
Returns a singleton instance.

Returns:
A NullCategoryCollection singleton instance.
Since:
BlackBerry API 6.0.0

add

public boolean add(String category)
Does not add the specified category.

Overrides:
add in class CategoryCollection
Parameters:
category - Category to add.
Returns:
Always returns false.
Since:
BlackBerry API 6.0.0

addAll

public boolean addAll(CategoryCollection categories)
Does not add all the specified categories.

Overrides:
addAll in class CategoryCollection
Parameters:
categories - Collection of categories to add.
Returns:
Always returns false.
Since:
BlackBerry API 6.0.0

addAll

public boolean addAll(String[] categories)
Does not add all the specified categories.

Overrides:
addAll in class CategoryCollection
Parameters:
categories - Array of categories to add. If categories is null, the collection is not modified.
Returns:
Always returns false.
Since:
BlackBerry API 6.0.0





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