|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | |||||||||
java.lang.Objectjava.lang.Enum<PojomaticPolicy>
org.pojomatic.annotations.PojomaticPolicy
public enum PojomaticPolicy
A policy for defining which sets of Pojomatic operations
(equals, hashCode and toString) should use a property.
This is set using Property.
DefaultPojomaticPolicy| Enum Constant Summary | |
|---|---|
ALL
Use the property for hashCode, equals and toString. |
|
DEFAULT
Use the default policy specified via the @AutoProperty annotation, or
ALL if none was specified. |
|
EQUALS
Use the property for equals only. |
|
EQUALS_TO_STRING
Use the property for both equals and toString. |
|
HASHCODE_EQUALS
Use the property for both hashCode and equals. |
|
NONE
Do not use the property for any of hashCode, equals or toString. |
|
TO_STRING
Use the property for both toString only. |
|
| Method Summary | |
|---|---|
java.util.Set<PropertyRole> |
getRoles()
|
static PojomaticPolicy |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. |
static PojomaticPolicy[] |
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 PojomaticPolicy HASHCODE_EQUALS
hashCode and equals.
Anything included in public int hashCode() should also be included in
public boolean equals(Object) to preserve the general
contract of Object.hashCode().
Object.hashCode(),
Object.equals(Object)public static final PojomaticPolicy EQUALS_TO_STRING
equals and toString.
Object.equals(Object),
Object.toString()public static final PojomaticPolicy EQUALS
equals only.
Object.equals(Object)public static final PojomaticPolicy TO_STRING
toString only.
Object.toString()public static final PojomaticPolicy ALL
hashCode, equals and toString.
public static final PojomaticPolicy NONE
hashCode, equals or toString.
public static final PojomaticPolicy DEFAULT
@AutoProperty annotation, or
ALL if none was specified.
| Method Detail |
|---|
public static PojomaticPolicy[] values()
for (PojomaticPolicy c : PojomaticPolicy.values()) System.out.println(c);
public static PojomaticPolicy valueOf(java.lang.String name)
name - the name of the enum constant to be returned.
java.lang.IllegalArgumentException - if this enum type has no constant
with the specified name
java.lang.NullPointerException - if the argument is nullpublic java.util.Set<PropertyRole> getRoles()
null for DEFAULT.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | |||||||||