|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Object java.lang.Enum<DefaultPojomaticPolicy> org.pojomatic.annotations.DefaultPojomaticPolicy
public enum DefaultPojomaticPolicy
A policy for defining which sets of Pojomatic
operations
(equals
, hashCode
and toString
) should use all properties by default.
This is set class-wide using AutoProperty
.
PojomaticPolicy
Enum Constant Summary | |
---|---|
ALL
Use all properties for hashCode , equals and toString by default. |
|
EQUALS
Use all properties for equals only by default. |
|
EQUALS_TO_STRING
Use all properties for both equals and toString by default. |
|
HASHCODE_EQUALS
Use all properties for both hashCode and equals by default. |
|
NONE
Do not use any properties for any of hashCode , equals or toString
by default. |
|
TO_STRING
Use all properties for both toString only by default. |
Method Summary | |
---|---|
java.util.Set<PropertyRole> |
getRoles()
|
static DefaultPojomaticPolicy |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. |
static DefaultPojomaticPolicy[] |
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 DefaultPojomaticPolicy HASHCODE_EQUALS
hashCode
and equals
by default.
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 DefaultPojomaticPolicy EQUALS
equals
only by default.
Object.equals(Object)
public static final DefaultPojomaticPolicy EQUALS_TO_STRING
equals
and toString
by default.
Object.equals(Object)
,
Object.toString()
public static final DefaultPojomaticPolicy TO_STRING
toString
only by default.
Object.toString()
public static final DefaultPojomaticPolicy ALL
hashCode
, equals
and toString
by default.
public static final DefaultPojomaticPolicy NONE
hashCode
, equals
or toString
by default.
Method Detail |
---|
public static DefaultPojomaticPolicy[] values()
for (DefaultPojomaticPolicy c : DefaultPojomaticPolicy.values()) System.out.println(c);
public static DefaultPojomaticPolicy 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()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |