megamek.common.util
Interface Categorized

All Known Implementing Classes:
DirectoryItems, ZippedItems

public interface Categorized

This interface represents a collection of items organized according to categories. These categories are not necessarily hierarchical. Created on January 17, 2004

Version:
1
Author:
James Damour

Method Summary
 java.util.Iterator<java.lang.String> getCategoryNames()
          Get the names of all the categories.
 java.lang.Object getItem(java.lang.String categoryName, java.lang.String itemName)
          Get the indicated item from the correct catagory.
 java.util.Iterator<java.lang.String> getItemNames(java.lang.String categoryName)
          Get the names of all the items in one of the categories.
 

Method Detail

getCategoryNames

java.util.Iterator<java.lang.String> getCategoryNames()
Get the names of all the categories.

Returns:
an Enumeration of String names. This value will not be null, but it may be empty.

getItemNames

java.util.Iterator<java.lang.String> getItemNames(java.lang.String categoryName)
Get the names of all the items in one of the categories.

Parameters:
categoryName - - the String name of the category whose item names are required.
Returns:
an Enumeration of String names. This value will not be null, but it may be empty.

getItem

java.lang.Object getItem(java.lang.String categoryName,
                         java.lang.String itemName)
                         throws java.lang.Exception
Get the indicated item from the correct catagory.

Parameters:
categoryName - - the String name of the category whose item names are required.
itemName - - the String name of the indicated item.
Returns:
the Object in the correct category with the given name. This value may be null.
Throws:
Exception - if there's any error getting the item.
java.lang.Exception