Serializable
, Comparable<PojomaticPolicy>
public enum PojomaticPolicy extends Enum<PojomaticPolicy>
Pojomatic
operations
(equals
, hashCode
and toString
) should use a property.
This is set using Property
.DefaultPojomaticPolicy
Enum Constant | Description |
---|---|
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. |
Modifier and Type | Method | Description |
---|---|---|
Set<PropertyRole> |
getRoles() |
|
static PojomaticPolicy |
valueOf(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.
|
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.public static PojomaticPolicy[] values()
for (PojomaticPolicy c : PojomaticPolicy.values()) System.out.println(c);
public static PojomaticPolicy valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic Set<PropertyRole> getRoles()
null
for DEFAULT
.Copyright © 2008–2018. All rights reserved.