19 package org.turro.indicator;
21 import java.io.Serializable;
22 import java.util.HashSet;
23 import java.util.Objects;
25 import org.turro.string.Strings;
33 private final String root, name;
34 private final boolean preprocess, reversed;
36 private final Set<String> avoid;
39 this(root, name, preprocess, type,
false,
null);
43 this(root, name, preprocess, type, reversed,
null);
47 this(root, name, preprocess, type,
false, avoid);
53 this.preprocess = preprocess;
55 this.reversed = reversed;
56 this.avoid = Strings.isBlank(avoid) ? null :
new HashSet<>(Strings.csvToList(avoid));
93 return avoid ==
null || !avoid.contains(root);
107 hash = 97 * hash + Objects.hashCode(this.root);
108 hash = 97 * hash + Objects.hashCode(this.name);
109 hash = 97 * hash + (this.preprocess ? 1 : 0);
110 hash = 97 * hash + Objects.hashCode(this.type);
122 if (getClass() != obj.getClass()) {
126 if (this.preprocess != other.preprocess) {
129 if (!Objects.equals(
this.root, other.root)) {
132 if (!Objects.equals(
this.name, other.name)) {
135 if (this.type != other.type) {
boolean permits(String root)
static IndicatorVariable result(String root, VariableType type)
IndicatorVariable(String root, String name, boolean preprocess, VariableType type, boolean reversed)
boolean equals(Object obj)
IndicatorVariable(String root, String name, boolean preprocess, VariableType type)
IndicatorVariable(String root, String name, boolean preprocess, VariableType type, String avoid)
IndicatorVariable(String root, String name, boolean preprocess, VariableType type, boolean reversed, String avoid)