mirror of
https://github.com/dmolony/DiskBrowser.git
synced 2024-12-01 09:50:32 +00:00
31 lines
987 B
Java
31 lines
987 B
Java
package com.bytezone.diskbrowser.visicalc;
|
|
|
|
// -----------------------------------------------------------------------------------//
|
|
class Not extends BooleanFunction
|
|
// -----------------------------------------------------------------------------------//
|
|
{
|
|
// ---------------------------------------------------------------------------------//
|
|
Not (Cell cell, String text)
|
|
// ---------------------------------------------------------------------------------//
|
|
{
|
|
super (cell, text);
|
|
assert text.startsWith ("@NOT(") : text;
|
|
}
|
|
|
|
// ---------------------------------------------------------------------------------//
|
|
@Override
|
|
public void calculate ()
|
|
// ---------------------------------------------------------------------------------//
|
|
{
|
|
source.calculate ();
|
|
|
|
if (source.getValueType () != ValueType.BOOLEAN)
|
|
{
|
|
valueResult = ValueResult.ERROR;
|
|
return;
|
|
}
|
|
|
|
bool = !source.getBoolean ();
|
|
valueResult = ValueResult.VALID;
|
|
}
|
|
} |