2017-03-23 13:30:41 +00:00
|
|
|
package com.bytezone.diskbrowser.visicalc;
|
|
|
|
|
|
|
|
public class ConditionListFunction extends Function
|
|
|
|
{
|
|
|
|
protected final ConditionList conditions;
|
|
|
|
|
|
|
|
ConditionListFunction (Cell cell, String text)
|
|
|
|
{
|
|
|
|
super (cell, text);
|
|
|
|
|
|
|
|
conditions = new ConditionList (cell, functionText);
|
|
|
|
valueType = ValueType.BOOLEAN;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public String getType ()
|
|
|
|
{
|
|
|
|
return "ConditionListFunction";
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public String toString ()
|
|
|
|
{
|
|
|
|
StringBuilder text = new StringBuilder ();
|
2017-03-24 02:00:11 +00:00
|
|
|
text.append (String.format ("%s%n", LINE));
|
|
|
|
text.append (
|
|
|
|
String.format (FMT4, "CFN", getFullText (), valueType, getValueText (this)));
|
2017-03-23 13:30:41 +00:00
|
|
|
for (Value value : conditions)
|
2017-03-24 02:00:11 +00:00
|
|
|
text.append (String.format (FMT4, value.getType (), value.getFullText (),
|
|
|
|
value.getValueType (), getValueText (value)));
|
2017-03-23 13:30:41 +00:00
|
|
|
return text.toString ();
|
|
|
|
}
|
|
|
|
}
|