|
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.Objectjava.lang.Enum<SequenceValuePolicy>
dk.rode.thesis.bridge.SequenceValuePolicy
public enum SequenceValuePolicy
Standard policies for formatting SequenceValueGenerator
objects into char sequences (not part of the core Bridge implementation).
Implementation notes:
This is NOT part of the core Bridge functionality, merely
to provide better log descriptions!
See implementation notes for the ObjectPolicy
enumeration.
ObjectPolicy
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface dk.rode.thesis.strategy.StringablePolicy |
---|
StringablePolicy.NameIdiom, StringablePolicy.Type |
Enum Constant Summary | |
---|---|
ID
Generates a char sequence representation of a value generator having the following format: SequenceValueGenerator[..] |
|
IDENTITY
Generates a char sequence representation of a value generator having the following format: SequenceValueGenerator[hash-code: ..[; identity-hash-code: ..]; size: ..] |
|
NAME
Generates a char sequence representation of a value generator having the following format: SequenceValueGenerator Where SequenceValueGenerator is the simple class name of
the class of the values. |
|
VALUES
Generates a char sequence representation of a value generator having the following format: SequenceValueGenerator[hash-code: ..[; identity-hash-code: ..]; size: ..; number: ..; [values: ..]] |
|
VERBOSE
Generates a char sequence representation of a value generator having the following format: SequenceValueGenerator[hash-code: ..[; identity-hash-code: ..]; type: ..; size: ..; number: ..; ordered: ..; sorted: ..; duplicates: ..] |
Method Summary | |
---|---|
StringablePolicy.Type |
type()
Returns the type of this policy. |
static SequenceValuePolicy |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static SequenceValuePolicy[] |
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 |
Methods inherited from interface dk.rode.thesis.strategy.StringablePolicy |
---|
toString |
Enum Constant Detail |
---|
public static final SequenceValuePolicy ID
SequenceValueGenerator[..]Where
SequenceValueGenerator
is the simple class name
of the class of the values, and ..
is the identity
hash-code of the values.
ObjectPolicy.ID
public static final SequenceValuePolicy IDENTITY
SequenceValueGenerator[hash-code: ..[; identity-hash-code: ..]; size: ..]Where
SequenceValueGenerator
is the simple class name
of the class of the values, and ..
are the hash-code(s)
and size of the values, respectively.
ObjectPolicy.IDENTITY_OPEN
public static final SequenceValuePolicy NAME
SequenceValueGeneratorWhere
SequenceValueGenerator
is the simple class name of
the class of the values.
ObjectPolicy.NAME
public static final SequenceValuePolicy VALUES
SequenceValueGenerator[hash-code: ..[; identity-hash-code: ..]; size: ..; number: ..; [values: ..]]Where
SequenceValueGenerator
is the simple class name of
the class of the values, and values
list the
actual values for value collections
,
ordered and sorted, if possible.
ObjectPolicy.IDENTITY_OPEN
public static final SequenceValuePolicy VERBOSE
SequenceValueGenerator[hash-code: ..[; identity-hash-code: ..]; type: ..; size: ..; number: ..; ordered: ..; sorted: ..; duplicates: ..]Where
SequenceValueGenerator
is the simple class name of
the class of the values.
ObjectPolicy.IDENTITY_OPEN
Method Detail |
---|
public StringablePolicy.Type type()
StringablePolicy
type
of this policy.
The stringable
context can use the
type to decide how to use the textual representation of
this policy in conjunction with additional text.
type
in interface StringablePolicy<SequenceValueGenerator<?>>
StringablePolicy.Type.APPENDABLE
.public static SequenceValuePolicy 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 SequenceValuePolicy[] values()
for (SequenceValuePolicy c : SequenceValuePolicy.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 |