|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Combination
Interface for a combination belonging to a combination lock.
Method Summary | |
---|---|
boolean |
equals(Combination otherCombo)
tests whether two combinations are the same |
int |
getInt()
get the combination as an integer |
String |
getString()
get the combination as a String |
void |
setInt(int newCombo)
set the combination using an integer |
void |
setString(String newCombo)
set the combination using a string |
String |
toString()
provide a string representation of this object |
Method Detail |
---|
int getInt()
String getString()
void setInt(int newCombo) throws OutOfBounds
newCombo
- the combination represented by an integer
OutOfBounds
- if the integer is not in the range 0 to 999void setString(String newCombo) throws OutOfBounds, NumberFormatException
newCombo
- the combination represented by a String
NumberFormatException
- thrown by Integer.parseInt if the
String cannot be parsed to an integer (you do not need to throw this
in your code)
OutOfBounds
- if the String represents a number not in the range 0 to 999boolean equals(Combination otherCombo)
otherCombo
- the Combination object to compare with this one
String toString()
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |