Serializable
, Comparable<DefaultPojomaticPolicy>
public enum DefaultPojomaticPolicy extends Enum<DefaultPojomaticPolicy>
Pojomatic
operations
(equals
, hashCode
and toString
) should use all properties by default.
This is set class-wide using AutoProperty
.PojomaticPolicy
Enum Constant | Description |
---|---|
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. |
Modifier and Type | Method | Description |
---|---|---|
Set<PropertyRole> |
getRoles() |
|
static DefaultPojomaticPolicy |
valueOf(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.
|
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.public static DefaultPojomaticPolicy[] values()
for (DefaultPojomaticPolicy c : DefaultPojomaticPolicy.values()) System.out.println(c);
public static DefaultPojomaticPolicy 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()
Copyright © 2008–2018. All rights reserved.