|
Evaluating Software Design Patterns — the "Gang of Four" patterns implemented in Java 6 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Object java.lang.Enum<StringablePolicy.Type> dk.rode.thesis.strategy.StringablePolicy.Type
public static enum StringablePolicy.Type
A policy type is a hint a stringable
context can use to decide how to use the textual representation a
given policy
generates in conjunction with
additional textual information required to generate an overall
representation.
A Stringable
object that has been formatted with a
policy having the CLOSED
type hints to the stringable context
that additional text should not be appended to its representation,
where as the OPEN
type on the contrary expects the
context to do so.
The APPENDABLE
type represents a complete stand-alone
textual representation (as do CLOSED
), but where
stringable contexts may append additional text if they desire,
or simply use as is.
StringablePolicy.type()
Enum Constant Summary | |
---|---|
APPENDABLE
The context is free to append text to the generated representation if it so desires. |
|
CLOSED
The context is expected not to append text to the generated representation. |
|
OPEN
The context is expected to append text to the generated representation. |
Method Summary | |
---|---|
static StringablePolicy.Type |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static StringablePolicy.Type[] |
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, toString, valueOf |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
public static final StringablePolicy.Type APPENDABLE
public static final StringablePolicy.Type CLOSED
public static final StringablePolicy.Type OPEN
Method Detail |
---|
public static StringablePolicy.Type 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 static StringablePolicy.Type[] values()
for (StringablePolicy.Type c : StringablePolicy.Type.values()) System.out.println(c);
|
Gunni Rode / rode.dk | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |