@Immutable public class HasValueFlag extends AbstractFlagConstraint implements TypeConstraint
TypeDefinition
s that have no
properties, otherwise disabled by default.Binding
constraint defines the Java binding for the value.Binding
,
AugmentedValueFlag
Modifier and Type | Field and Description |
---|---|
static HasValueFlag |
DISABLED
Disabled has value flag
|
static HasValueFlag |
ENABLED
Enabled has value flag
|
Modifier | Constructor and Description |
---|---|
|
HasValueFlag()
Creates a default simple type flag, which is disabled.
|
protected |
HasValueFlag(boolean enabled) |
|
HasValueFlag(TypeDefinition typeDef)
Creates a default simple type flag from a type definition.
|
Modifier and Type | Method and Description |
---|---|
static HasValueFlag |
get(boolean hasValue)
Get the simple type flag
|
boolean |
isInheritable()
Determines if the constraint is inheritable, meaning it may be used for a
sub-type.
|
equals, hashCode, isEnabled
public static final HasValueFlag ENABLED
public static final HasValueFlag DISABLED
public HasValueFlag()
ENABLED
or
DISABLED
.Constraint
public HasValueFlag(TypeDefinition typeDef)
typeDef
- the type definitionConstraint
protected HasValueFlag(boolean enabled)
public static HasValueFlag get(boolean hasValue)
hasValue
- if the flag shall be enabledpublic boolean isInheritable()
TypeConstraint
isInheritable
in interface TypeConstraint
TypeConstraint.isInheritable()
Build 2013-10-07_11-27-38
Revision 99b27713a799a59a21b0b166eaaea8aaefbf125a