Class AACCategory
java.lang.Object
AACCategory
- All Implemented Interfaces:
AACPage
Represents the mappings for a single page of items that should be displayed
- Author:
- Catie Baker and YOUR NAME HERE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds the image location, text pairing to the categoryReturns the name of the categoryString[]
Returns an array of all the images in the categoryboolean
Determines if the provided images is stored in the categoryReturns the text associated with the given image in this category
-
Constructor Details
-
AACCategory
Creates a new empty category with the given name- Parameters:
name
- the name of the category
-
-
Method Details
-
addItem
Adds the image location, text pairing to the category -
getCategory
Returns the name of the category- Specified by:
getCategory
in interfaceAACPage
- Returns:
- the name of the category
-
hasImage
Determines if the provided images is stored in the category -
getImageLocs
Returns an array of all the images in the category- Specified by:
getImageLocs
in interfaceAACPage
- Returns:
- the array of image locations
-
select
Returns the text associated with the given image in this category- Specified by:
select
in interfaceAACPage
- Parameters:
imageLoc
- the location of the image- Returns:
- the text associated with the image
- Throws:
NoSuchElementException
- if the image provided is not in the current category
-