@ThreadSafe public class FlagContainerThreadSafe extends FlagContainer
FlagContainer!| Modifier and Type | Field and Description |
|---|---|
protected ReadWriteLock |
m_aRWLock |
| Constructor and Description |
|---|
FlagContainerThreadSafe() |
FlagContainerThreadSafe(Collection<String> aValues) |
FlagContainerThreadSafe(IReadonlyFlagContainer aCont) |
FlagContainerThreadSafe(String... aValues) |
| Modifier and Type | Method and Description |
|---|---|
EChange |
addFlag(String sName)
Add a flag if it is not yet present.
|
EChange |
clear()
Reset the contents of the element to the after-construction state.
|
boolean |
containsFlag(String sName)
Check if an flag of the given name is contained.
|
boolean |
containsNoFlag() |
boolean |
equals(Object o) |
Set<String> |
getAllFlags() |
int |
getFlagCount() |
int |
hashCode() |
EChange |
removeFlag(String sName)
Remove the specified flag from the container.
|
String |
toString() |
addFlags, addFlagsprotected final ReadWriteLock m_aRWLock
public FlagContainerThreadSafe()
public FlagContainerThreadSafe(@Nonnull Collection<String> aValues)
public FlagContainerThreadSafe(@Nonnull IReadonlyFlagContainer aCont)
public boolean containsFlag(@Nullable String sName)
IReadonlyFlagContainercontainsFlag in interface IReadonlyFlagContainercontainsFlag in class FlagContainersName - name of the flag to checktrue if the flag is contained, false
otherwise@Nonnull @ReturnsMutableCopy public Set<String> getAllFlags()
getAllFlags in interface IReadonlyFlagContainergetAllFlags in class FlagContainernull set with all contained flags.@Nonnull public EChange addFlag(@Nonnull String sName)
IFlagContaineraddFlag in interface IFlagContaineraddFlag in class FlagContainersName - The name of the flag. May not be null.EChange.CHANGED if something changed,
EChange.UNCHANGED otherwise.IFlagContainer.removeFlag(String)@Nonnull public EChange removeFlag(@Nullable String sName)
IFlagContainerremoveFlag in interface IFlagContainerremoveFlag in class FlagContainersName - The flag name to be removed. If it is null nothing
happens.EChange.CHANGED if something changed,
EChange.UNCHANGED otherwise.@Nonnegative public int getFlagCount()
getFlagCount in interface IReadonlyFlagContainergetFlagCount in class FlagContainerpublic boolean containsNoFlag()
containsNoFlag in interface IReadonlyFlagContainercontainsNoFlag in class FlagContainertrue if this flag container does not contain any flag
at all, false if at least one flag is contained.@Nonnull public EChange clear()
IClearableclear in interface IClearableclear in class FlagContainerEChange.CHANGED if at least one element was cleared,
EChange.UNCHANGED otherwise.public boolean equals(Object o)
equals in class FlagContainerpublic int hashCode()
hashCode in class FlagContainerpublic String toString()
toString in class FlagContainerCopyright © 2006–2015 phloc systems. All rights reserved.