diff options
Diffstat (limited to 'subprojects/store-query/src/main/java/tools/refinery/store/query/view/SymbolView.java')
-rw-r--r-- | subprojects/store-query/src/main/java/tools/refinery/store/query/view/SymbolView.java | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/view/SymbolView.java b/subprojects/store-query/src/main/java/tools/refinery/store/query/view/SymbolView.java index 267a99d3..cd8bd56b 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/view/SymbolView.java +++ b/subprojects/store-query/src/main/java/tools/refinery/store/query/view/SymbolView.java | |||
@@ -21,7 +21,6 @@ import java.util.UUID; | |||
21 | */ | 21 | */ |
22 | public abstract non-sealed class SymbolView<T> implements AnySymbolView { | 22 | public abstract non-sealed class SymbolView<T> implements AnySymbolView { |
23 | private final Symbol<T> symbol; | 23 | private final Symbol<T> symbol; |
24 | |||
25 | private final String viewName; | 24 | private final String viewName; |
26 | 25 | ||
27 | protected SymbolView(Symbol<T> symbol, String viewName) { | 26 | protected SymbolView(Symbol<T> symbol, String viewName) { |
@@ -48,7 +47,11 @@ public abstract non-sealed class SymbolView<T> implements AnySymbolView { | |||
48 | return symbol.name() + "#" + viewName; | 47 | return symbol.name() + "#" + viewName; |
49 | } | 48 | } |
50 | 49 | ||
51 | public abstract boolean filter(Tuple key, T value); | 50 | public final boolean filter(Tuple key, T value) { |
51 | return !Objects.equals(symbol.defaultValue(), value) && doFilter(key, value); | ||
52 | } | ||
53 | |||
54 | protected abstract boolean doFilter(Tuple key, T value); | ||
52 | 55 | ||
53 | public abstract Object[] forwardMap(Tuple key, T value); | 56 | public abstract Object[] forwardMap(Tuple key, T value); |
54 | 57 | ||
@@ -77,6 +80,6 @@ public abstract non-sealed class SymbolView<T> implements AnySymbolView { | |||
77 | 80 | ||
78 | @Override | 81 | @Override |
79 | public int hashCode() { | 82 | public int hashCode() { |
80 | return Objects.hash(symbol, viewName); | 83 | return Objects.hash(getClass(), symbol, viewName); |
81 | } | 84 | } |
82 | } | 85 | } |