BrightSide Workbench Full Report + Source Code
org.turro.indicator.IndicatorVariable Class Reference
Inheritance diagram for org.turro.indicator.IndicatorVariable:
Collaboration diagram for org.turro.indicator.IndicatorVariable:

Public Member Functions

 IndicatorVariable (String root, String name, boolean preprocess, VariableType type)
 
 IndicatorVariable (String root, String name, boolean preprocess, VariableType type, boolean reversed)
 
 IndicatorVariable (String root, String name, boolean preprocess, VariableType type, String avoid)
 
 IndicatorVariable (String root, String name, boolean preprocess, VariableType type, boolean reversed, String avoid)
 
String toString ()
 
String getFullName ()
 
String getRoot ()
 
String getName ()
 
boolean isPreprocess ()
 
VariableType getType ()
 
boolean isReversed ()
 
Set< String > getAvoid ()
 
boolean permits (String root)
 
long getMissingValue ()
 
int hashCode ()
 
boolean equals (Object obj)
 

Static Public Member Functions

static IndicatorVariable result (String root, VariableType type)
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 31 of file IndicatorVariable.java.

Constructor & Destructor Documentation

◆ IndicatorVariable() [1/4]

org.turro.indicator.IndicatorVariable.IndicatorVariable ( String  root,
String  name,
boolean  preprocess,
VariableType  type 
)

Definition at line 38 of file IndicatorVariable.java.

38  {
39  this(root, name, preprocess, type, false, null);
40  }
Here is the caller graph for this function:

◆ IndicatorVariable() [2/4]

org.turro.indicator.IndicatorVariable.IndicatorVariable ( String  root,
String  name,
boolean  preprocess,
VariableType  type,
boolean  reversed 
)

Definition at line 42 of file IndicatorVariable.java.

42  {
43  this(root, name, preprocess, type, reversed, null);
44  }

◆ IndicatorVariable() [3/4]

org.turro.indicator.IndicatorVariable.IndicatorVariable ( String  root,
String  name,
boolean  preprocess,
VariableType  type,
String  avoid 
)

Definition at line 46 of file IndicatorVariable.java.

46  {
47  this(root, name, preprocess, type, false, avoid);
48  }

◆ IndicatorVariable() [4/4]

org.turro.indicator.IndicatorVariable.IndicatorVariable ( String  root,
String  name,
boolean  preprocess,
VariableType  type,
boolean  reversed,
String  avoid 
)

Definition at line 50 of file IndicatorVariable.java.

50  {
51  this.root = root;
52  this.name = name;
53  this.preprocess = preprocess;
54  this.type = type;
55  this.reversed = reversed;
56  this.avoid = Strings.isBlank(avoid) ? null : new HashSet<>(Strings.csvToList(avoid));
57  }

Member Function Documentation

◆ equals()

boolean org.turro.indicator.IndicatorVariable.equals ( Object  obj)

Definition at line 115 of file IndicatorVariable.java.

115  {
116  if (this == obj) {
117  return true;
118  }
119  if (obj == null) {
120  return false;
121  }
122  if (getClass() != obj.getClass()) {
123  return false;
124  }
125  final IndicatorVariable other = (IndicatorVariable) obj;
126  if (this.preprocess != other.preprocess) {
127  return false;
128  }
129  if (!Objects.equals(this.root, other.root)) {
130  return false;
131  }
132  if (!Objects.equals(this.name, other.name)) {
133  return false;
134  }
135  if (this.type != other.type) {
136  return false;
137  }
138  return true;
139  }
IndicatorVariable(String root, String name, boolean preprocess, VariableType type)
Here is the call graph for this function:

◆ getAvoid()

Set<String> org.turro.indicator.IndicatorVariable.getAvoid ( )

Definition at line 88 of file IndicatorVariable.java.

88  {
89  return avoid;
90  }

◆ getFullName()

String org.turro.indicator.IndicatorVariable.getFullName ( )

Definition at line 64 of file IndicatorVariable.java.

64  {
65  return root + ":" + getName();
66  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getMissingValue()

long org.turro.indicator.IndicatorVariable.getMissingValue ( )

Definition at line 96 of file IndicatorVariable.java.

96  {
97  return isReversed() ? Long.MAX_VALUE : 0;
98  }
Here is the call graph for this function:

◆ getName()

String org.turro.indicator.IndicatorVariable.getName ( )

Definition at line 72 of file IndicatorVariable.java.

72  {
73  return name;
74  }
Here is the caller graph for this function:

◆ getRoot()

String org.turro.indicator.IndicatorVariable.getRoot ( )

Definition at line 68 of file IndicatorVariable.java.

68  {
69  return root;
70  }
Here is the caller graph for this function:

◆ getType()

VariableType org.turro.indicator.IndicatorVariable.getType ( )

Definition at line 80 of file IndicatorVariable.java.

80  {
81  return type;
82  }

◆ hashCode()

int org.turro.indicator.IndicatorVariable.hashCode ( )

Definition at line 105 of file IndicatorVariable.java.

105  {
106  int hash = 3;
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);
111  return hash;
112  }

◆ isPreprocess()

boolean org.turro.indicator.IndicatorVariable.isPreprocess ( )

Definition at line 76 of file IndicatorVariable.java.

76  {
77  return preprocess;
78  }
Here is the caller graph for this function:

◆ isReversed()

boolean org.turro.indicator.IndicatorVariable.isReversed ( )

Definition at line 84 of file IndicatorVariable.java.

84  {
85  return reversed;
86  }
Here is the caller graph for this function:

◆ permits()

boolean org.turro.indicator.IndicatorVariable.permits ( String  root)

Definition at line 92 of file IndicatorVariable.java.

92  {
93  return avoid == null || !avoid.contains(root);
94  }

◆ result()

static IndicatorVariable org.turro.indicator.IndicatorVariable.result ( String  root,
VariableType  type 
)
static

Definition at line 100 of file IndicatorVariable.java.

100  {
101  return new IndicatorVariable(root, "*", false, type);
102  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ toString()

String org.turro.indicator.IndicatorVariable.toString ( )

Definition at line 60 of file IndicatorVariable.java.

60  {
61  return getFullName();
62  }
Here is the call graph for this function:

The documentation for this class was generated from the following file: