Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
NotIn.cs
1using System;
6
8{
12 public class NotIn : In
13 {
23 : base(Left, Right, Start, Length, Expression)
24 {
25 }
26
33 public override IElement Evaluate(IElement Left, ISet Right)
34 {
35 if (Right.Contains(Left))
36 return BooleanValue.False;
37 else
38 return BooleanValue.True;
39 }
40
47 public override IElement Evaluate(IElement Left, IVector Right)
48 {
49 foreach (IElement Element in Right.ChildElements)
50 {
51 if (Left.Equals(Element))
52 return BooleanValue.False;
53 }
54
55 return BooleanValue.True;
56 }
57 }
58}
Base class for all types of elements.
Definition: Element.cs:13
virtual ICollection< IElement > ChildElements
An enumeration of child elements. If the element is a scalar, this property will return null.
Definition: Element.cs:62
Class managing a script expression.
Definition: Expression.cs:39
Base class for all nodes in a parsed script tree.
Definition: ScriptNode.cs:69
int Length
Length of expression covered by node.
Definition: ScriptNode.cs:101
int Start
Start position in script expression.
Definition: ScriptNode.cs:92
Boolean-valued number.
Definition: BooleanValue.cs:12
static readonly BooleanValue False
Constant false value.
static readonly BooleanValue True
Constant true value.
override IElement Evaluate(IElement Left, ISet Right)
Evaluates the operator.
Definition: NotIn.cs:33
NotIn(ScriptNode Left, ScriptNode Right, int Start, int Length, Expression Expression)
Not-In operator
Definition: NotIn.cs:22
override IElement Evaluate(IElement Left, IVector Right)
Evaluates the operator.
Definition: NotIn.cs:47
Basic interface for all types of elements.
Definition: IElement.cs:20
Basic interface for vectors.
Definition: IVector.cs:9
Basic interface for all types of sets.
Definition: ISet.cs:10
bool Contains(IElement Element)
Checks if the set contains an element.