Return the loaded objects from storage methods as opposed to success flags

This commit is contained in:
Luck committed 2017-12-18 17:03:59 +00:00
1 parent 765f140121
commit a415a2705f
36 files changed
+414 -366

No files matched your search

@@ -44,17 +44,18 @@ public enum ChatMetaType {
*/
PREFIX {
@Override
public boolean matches(Node node) {
public boolean matches(@Nonnull Node node) {
return Preconditions.checkNotNull(node, "node").isPrefix();
}
@Override
public boolean shouldIgnore(Node node) {
public boolean shouldIgnore(@Nonnull Node node) {
return !Preconditions.checkNotNull(node, "node").isPrefix();
}
@Nonnull
@Override
public Map.Entry<Integer, String> getEntry(Node node) {
public Map.Entry<Integer, String> getEntry(@Nonnull Node node) {
return Preconditions.checkNotNull(node, "node").getPrefix();
}
},
@@ -64,17 +65,18 @@ public enum ChatMetaType {
*/
SUFFIX {
@Override
public boolean matches(Node node) {
public boolean matches(@Nonnull Node node) {
return Preconditions.checkNotNull(node, "node").isSuffix();
}
@Override
public boolean shouldIgnore(Node node) {
public boolean shouldIgnore(@Nonnull Node node) {
return !Preconditions.checkNotNull(node, "node").isSuffix();
}
@Nonnull
@Override
public Map.Entry<Integer, String> getEntry(Node node) {
public Map.Entry<Integer, String> getEntry(@Nonnull Node node) {
return Preconditions.checkNotNull(node, "node").getSuffix();
}
};