uk.co.keang.sudoku
Enum Puzzle.PuzzleDifficulty
java.lang.Object
java.lang.Enum<Puzzle.PuzzleDifficulty>
uk.co.keang.sudoku.Puzzle.PuzzleDifficulty
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Comparable<Puzzle.PuzzleDifficulty>
- Enclosing class:
- Puzzle
public static enum Puzzle.PuzzleDifficulty
- extends java.lang.Enum<Puzzle.PuzzleDifficulty>
Methods inherited from class java.lang.Enum |
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
UNKNOWN
public static final Puzzle.PuzzleDifficulty UNKNOWN
TOO_EASY
public static final Puzzle.PuzzleDifficulty TOO_EASY
BEGINNER
public static final Puzzle.PuzzleDifficulty BEGINNER
EASY
public static final Puzzle.PuzzleDifficulty EASY
MEDIUM
public static final Puzzle.PuzzleDifficulty MEDIUM
HARD
public static final Puzzle.PuzzleDifficulty HARD
EXTREME
public static final Puzzle.PuzzleDifficulty EXTREME
values
public static Puzzle.PuzzleDifficulty[] values()
- Returns an array containing the constants of this enum type, in
the order they are declared. This method may be used to iterate
over the constants as follows:
for (Puzzle.PuzzleDifficulty c : Puzzle.PuzzleDifficulty.values())
System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in
the order they are declared
valueOf
public static Puzzle.PuzzleDifficulty valueOf(java.lang.String name)
- Returns the enum constant of this type with the specified name.
The string must match exactly an identifier used to declare an
enum constant in this type. (Extraneous whitespace characters are
not permitted.)
- Parameters:
name
- the name of the enum constant to be returned.
- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant
with the specified name
java.lang.NullPointerException
- if the argument is null
minNumbers
public int minNumbers()
maxNumbers
public int maxNumbers()
getMinDifficultyValue
int getMinDifficultyValue()
getDifficulty
static Puzzle.PuzzleDifficulty getDifficulty(int diff)
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Enum<Puzzle.PuzzleDifficulty>
setWordCapitalisation
public static java.lang.String setWordCapitalisation(java.lang.String text)
- Set the capitalisation of the text on a word basis.
All text to set to lower case and then the first letter of each word is
set to upper case.
A word is a group of characters following a whitespace character.
- Parameters:
text
- - the text to capitalise
- Returns:
- String - the capitalised text