Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Moving helper method from resource to separate class.
- Loading branch information
1 parent
cb3a2db
commit ac1cf49
Showing
2 changed files
with
18 additions
and
10 deletions.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
graylog2-plugin-interfaces/src/main/java/org/graylog2/plugin/Capabilities.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package org.graylog2.plugin; | ||
|
||
import com.google.common.collect.Sets; | ||
|
||
import java.util.Set; | ||
|
||
public class Capabilities { | ||
public static Set<String> toStringSet(Set<ServerStatus.Capability> capabilities) { | ||
final Set<String> stringSet = Sets.newHashSetWithExpectedSize(capabilities.size()); | ||
for (ServerStatus.Capability capability : capabilities) { | ||
stringSet.add(capability.toString()); | ||
} | ||
|
||
return stringSet; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters