Class AACCategory
java.lang.Object
AACCategory
public class AACCategory
extends java.lang.Object
Represents the mappings for a single page of items that should
be displayed
- Author:
- Catie Baker
-
Constructor Summary
Constructors Constructor Description AACCategory(java.lang.String name)
Creates a new empty category with the given name -
Method Summary
Modifier and Type Method Description void
addItem(java.lang.String imageLoc, java.lang.String text)
Adds the mapping of the imageLoc to the text to the category.java.lang.String
getCategory()
Returns the name of the categoryjava.lang.String[]
getImages()
Returns an array of all the images in the categoryjava.lang.String
getText(java.lang.String imageLoc)
Returns the text associated with the given image loc in this categoryboolean
hasImage(java.lang.String imageLoc)
Determines if the provided images is stored in the category
-
Constructor Details
-
AACCategory
public AACCategory(java.lang.String name)Creates a new empty category with the given name- Parameters:
name
- the name of the category
-
-
Method Details
-
addItem
public void addItem(java.lang.String imageLoc, java.lang.String text)Adds the mapping of the imageLoc to the text to the category.- Parameters:
imageLoc
- the location of the image to addtext
- the text that image maps to
-
getCategory
public java.lang.String getCategory()Returns the name of the category- Returns:
- the name of the category
-
getText
public java.lang.String getText(java.lang.String imageLoc)Returns the text associated with the given image loc in this category- Parameters:
imageLoc
- the location of the image- Returns:
- the text associated with the image
-
hasImage
public boolean hasImage(java.lang.String imageLoc)Determines if the provided images is stored in the category- Parameters:
imageLoc
- the location of the category- Returns:
- true if it is in the category, false otherwise
-
getImages
public java.lang.String[] getImages()Returns an array of all the images in the category- Returns:
- the array of image locations
-