Package org.eclipse.gef.util
Class FlagSupport
- java.lang.Object
-
- org.eclipse.gef.util.FlagSupport
-
- Direct Known Subclasses:
AbstractTool
,AbstractTool.Input
public class FlagSupport extends java.lang.Object
A structure for storing multiple flags compactly using a 32-bitint
.
-
-
Constructor Summary
Constructors Constructor Description FlagSupport()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
getFlag(int flag)
Returnstrue
the flag (or one of the flags) indicated by the given bitmask is set to true.protected void
setFlag(int flag, boolean value)
Sets the flag (or all of the flags) indicated by the given bitmask to the given value.
-
-
-
Method Detail
-
getFlag
protected boolean getFlag(int flag)
Returnstrue
the flag (or one of the flags) indicated by the given bitmask is set to true.- Parameters:
flag
- the bitmask of a flag or flags- Returns:
true
if one of the flags is true
-
setFlag
protected void setFlag(int flag, boolean value)
Sets the flag (or all of the flags) indicated by the given bitmask to the given value.- Parameters:
flag
- the bitmask of the flag or flagsvalue
- the new value
-
-