mirror of
https://github.com/pgpainless/pgpainless.git
synced 2024-12-26 12:58:02 +01:00
Return list in KeyFlag.fromInteger
This commit is contained in:
parent
29fbf21d01
commit
9d9edbfd9d
1 changed files with 2 additions and 2 deletions
|
@ -41,13 +41,13 @@ public enum KeyFlag {
|
|||
return flag;
|
||||
}
|
||||
|
||||
public static KeyFlag[] fromInteger(int bitmask) {
|
||||
public static List<KeyFlag> fromInteger(int bitmask) {
|
||||
List<KeyFlag> flags = new ArrayList<>();
|
||||
for (KeyFlag f : KeyFlag.values()) {
|
||||
if ((bitmask & f.flag) != 0) {
|
||||
flags.add(f);
|
||||
}
|
||||
}
|
||||
return flags.toArray(new KeyFlag[]{});
|
||||
return flags;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue