public abstract class AbstractFlagAdvanced extends Object implements AttributeWriteFlagAdvanced
AttributeWriteFlagAdvanced
.Modifier and Type | Field and Description |
---|---|
private Set<FlagModifier> |
falseModifiersSet |
Modifier | Constructor and Description |
---|---|
|
AbstractFlagAdvanced()
The constructor.
|
protected |
AbstractFlagAdvanced(Set<FlagModifier> falseModifiersSet)
The constructor for a concurrent (thread-safe) implementation.
|
Modifier and Type | Method and Description |
---|---|
boolean |
getFlag()
This method reads the flag value.
|
boolean |
getFlag(FlagModifier modifier)
This method gets the value of the flag for the given
FlagModifier . |
void |
setFlag(boolean flag,
FlagModifier modifier)
This method sets the
flag for the given FlagModifier . |
private Set<FlagModifier> falseModifiersSet
setFlag(boolean, FlagModifier)
public AbstractFlagAdvanced()
protected AbstractFlagAdvanced(Set<FlagModifier> falseModifiersSet)
falseModifiersSet
- is the underlying Set
used to store the FlagModifier
for which
the flag has been set to false
.public boolean getFlag()
true
for all FlagModifier
s.getFlag
in interface AttributeReadFlag
getFlag
in interface AttributeReadFlagAdvanced
true
if all aggregated flags
are true
and all parents have the same flag set to true
.public boolean getFlag(FlagModifier modifier)
FlagModifier
. getFlag
in interface AttributeReadFlagAdvanced
modifier
- is the FlagModifier
. May be null
for the default modifier.FlagModifier
. Will be true
if it has never been set
for the given FlagModifier
.public void setFlag(boolean flag, FlagModifier modifier)
flag
for the given FlagModifier
.setFlag
in interface AttributeWriteFlagAdvanced
flag
- is the new value of flag
.modifier
- is the FlagModifier
. May be null
for the default modifier.Copyright © 2001–2016 mmm-Team. All rights reserved.