|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectCompetition
public class Competition
Creates and manages an array of objects of type MazeResult.
Field Summary | |
---|---|
static int |
ALL
Flag to signify ALL. |
static int |
FEMALE
Flag to signify FEMALE. |
static int |
MALE
Flag to signify MALE. |
static int |
NOT_VACCINATED
Flag to signify NOT_VACCINATED. |
static int |
VACCINATED
Flag to signify VACCINATED. |
Constructor Summary | |
---|---|
Competition(String inDesc)
Constructor for objects of class Competition. |
Method Summary | |
---|---|
void |
addMazeResult(MazeResult inMazeResult)
add a MazeResult object to the array list. |
void |
deleteMazeResult(int inIndex)
delete a MazeResult object from the array list. |
void |
deleteMazeResult(String inRFID)
delete MazeResult object from the array list. |
int |
getCount()
get the count of populated elements in the array list. |
String |
getDesc()
get the competition description. |
MazeResult |
getMazeResult(int inIndex)
get a MazeResult object from the array list. |
MazeResult |
getMazeResult(String inRFID)
get a MazeResult object from the array list. |
double |
getRatAveTime(int inCategory)
get the average ACTUAL time of rats for a given category. |
int |
getRatCount(int inCategory)
get the count of rats for a given category. |
boolean |
isCategoryMatch(int inCategory,
Rat inRat)
determine if the category matches condition. |
void |
setDesc(String inDesc)
set the competition description. |
void |
sortByTime(char inDirection)
Sort the array list by time, direction indicated by the explicit parameter. |
String |
toString()
get a formatted string with information about a competition. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int ALL
public static final int FEMALE
public static final int MALE
public static final int NOT_VACCINATED
public static final int VACCINATED
Constructor Detail |
---|
public Competition(String inDesc)
inDesc
- The competition description.Method Detail |
---|
public void addMazeResult(MazeResult inMazeResult)
inMazeResult
- The MazeResult object.public void deleteMazeResult(int inIndex)
inIndex
- The array list index position of the requested object.public void deleteMazeResult(String inRFID)
inRFID
- The Rat RFID in the object to delete.public int getCount()
public String getDesc()
public MazeResult getMazeResult(int inIndex)
inIndex
- The index position of the requested object.
public MazeResult getMazeResult(String inRFID)
inRFID
- The Rats RFID in the requested object.
public double getRatAveTime(int inCategory)
inCategory
- Numeric value representing a race category.
public int getRatCount(int inCategory)
inCategory
- Numeric value representing a rat category.
public boolean isCategoryMatch(int inCategory, Rat inRat)
inCategory
- Numeric value representing a result category.inRat
- Rat object with associated attributes.
public void setDesc(String inDesc)
inDesc
- The competition description.public void sortByTime(char inDirection)
inDirection
- A - ascending (shortest to longest)
D - descending (longest to shortest)
For an invalid sort direction, anything other than A or D
do nothing, no sort.
This method is based on the bblSort3 method
presented in Module 11.public String toString()
toString
in class Object
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |