|
sdr 0.7 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Object java.lang.Enum<StandardDancer> net.cscott.sdr.calls.StandardDancer
public enum StandardDancer
An object representing one of the eight real dancers.
js> const Tag = TaggedFormation.Tag; js> d = StandardDancer.COUPLE_1_BOY; COUPLE 1 BOY js> d.coupleNumber() 1 js> d.isHead() true js> d.isSide() false js> d.isBoy() true js> d.isGirl() false js> d.ordinal() 0 js> d.primitiveTag() DANCER_1 js> d.matchesTag(d.primitiveTag()) true js> d.matchesTag(Tag.BOY) true js> d.matchesTag(Tag.GIRL) false js> d.matchesTag(Tag.HEAD) true js> d.matchesTag(Tag.SIDE) false js> [d.matchesTag(t) for each (t in > [Tag.COUPLE_1, Tag.COUPLE_2, Tag.COUPLE_3, Tag.COUPLE_4])] true,false,false,false js> [d.matchesTag(t) for each (t in > [Tag.DANCER_1, Tag.DANCER_2, Tag.DANCER_3, Tag.DANCER_4, > Tag.DANCER_5, Tag.DANCER_6, Tag.DANCER_7, Tag.DANCER_8])] true,false,false,false,false,false,false,false js> d.matchesTag(Tag.NONE) false js> d.matchesTag(Tag.ALL) true
js> const Tag = TaggedFormation.Tag; js> d = StandardDancer.COUPLE_4_GIRL; COUPLE 4 GIRL js> d.coupleNumber() 4 js> d.isHead() false js> d.isSide() true js> d.isBoy() false js> d.isGirl() true js> d.ordinal() 7 js> d.primitiveTag() DANCER_8 js> d.matchesTag(d.primitiveTag()) true js> d.matchesTag(Tag.BOY) false js> d.matchesTag(Tag.GIRL) true js> d.matchesTag(Tag.HEAD) false js> d.matchesTag(Tag.SIDE) true js> [d.matchesTag(t) for each (t in > [Tag.COUPLE_1, Tag.COUPLE_2, Tag.COUPLE_3, Tag.COUPLE_4])] false,false,false,true js> [d.matchesTag(t) for each (t in > [Tag.DANCER_1, Tag.DANCER_2, Tag.DANCER_3, Tag.DANCER_4, > Tag.DANCER_5, Tag.DANCER_6, Tag.DANCER_7, Tag.DANCER_8])] false,false,false,false,false,false,false,true js> d.matchesTag(Tag.NONE) false js> d.matchesTag(Tag.ALL) true
Enum Constant Summary | |
---|---|
COUPLE_1_BOY
|
|
COUPLE_1_GIRL
|
|
COUPLE_2_BOY
|
|
COUPLE_2_GIRL
|
|
COUPLE_3_BOY
|
|
COUPLE_3_GIRL
|
|
COUPLE_4_BOY
|
|
COUPLE_4_GIRL
|
Method Summary | |
---|---|
int |
coupleNumber()
Returns a couple number, from 1-4. |
boolean |
isBoy()
|
boolean |
isGirl()
|
boolean |
isHead()
|
boolean |
isSide()
|
boolean |
matchesTag(TaggedFormation.Tag tag)
Certain dancer TaggedFormation.Tag s are inherent to a dancer,
for example 'DANCER_1', 'COUPLE_2', 'BOY' etc. |
TaggedFormation.Tag |
primitiveTag()
Returns the most-specific primitive tag for the given dancer, or 'null' if the dancer is a phantom. |
String |
toString()
|
static StandardDancer |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static StandardDancer[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
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 |
Enum Constant Detail |
---|
public static final StandardDancer COUPLE_1_BOY
public static final StandardDancer COUPLE_1_GIRL
public static final StandardDancer COUPLE_2_BOY
public static final StandardDancer COUPLE_2_GIRL
public static final StandardDancer COUPLE_3_BOY
public static final StandardDancer COUPLE_3_GIRL
public static final StandardDancer COUPLE_4_BOY
public static final StandardDancer COUPLE_4_GIRL
Method Detail |
---|
public static StandardDancer[] values()
for (StandardDancer c : StandardDancer.values()) System.out.println(c);
public static StandardDancer valueOf(String name)
name
- the name of the enum constant to be returned.
IllegalArgumentException
- if this enum type has no constant
with the specified name
NullPointerException
- if the argument is nullpublic int coupleNumber()
public boolean isHead()
isHead
in interface Dancer
public boolean isSide()
isSide
in interface Dancer
public boolean isBoy()
isBoy
in interface Dancer
public boolean isGirl()
isGirl
in interface Dancer
public boolean matchesTag(TaggedFormation.Tag tag)
Dancer
TaggedFormation.Tag
s are inherent to a dancer,
for example 'DANCER_1', 'COUPLE_2', 'BOY' etc.
This method identifies if one of these tags
is appropriate for the current Dancer
.
matchesTag
in interface Dancer
public TaggedFormation.Tag primitiveTag()
Dancer
primitiveTag
in interface Dancer
public String toString()
toString
in class Enum<StandardDancer>
|
sdr 0.7 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |