mirror of
https://github.com/dmolony/DiskBrowser.git
synced 2024-09-24 03:57:36 +00:00
32 lines
567 B
Java
32 lines
567 B
Java
package com.bytezone.diskbrowser.visicalc;
|
|
|
|
class Or extends ConditionListFunction
|
|
{
|
|
public Or (Cell cell, String text)
|
|
{
|
|
super (cell, text);
|
|
assert text.startsWith ("@OR(") : text;
|
|
}
|
|
|
|
@Override
|
|
public void calculate ()
|
|
{
|
|
for (Value condition : conditions)
|
|
{
|
|
condition.calculate ();
|
|
|
|
if (condition.getValueType () != ValueType.BOOLEAN)
|
|
{
|
|
valueResult = ValueResult.ERROR;
|
|
return;
|
|
}
|
|
|
|
if (condition.getBoolean ())
|
|
{
|
|
bool = true;
|
|
return;
|
|
}
|
|
}
|
|
bool = false;
|
|
}
|
|
} |