// Path: src/ruleParser/Tokens.java
// public class Tokens 
// {
// 	public List<String> tokensList;
// 	public List<String> tokensStringList;
// 	public String tokensString;
// 	
// 	public Tokens(List<String> tl, List<String> tsl, String ts) {
// 		tokensList = tl;
// 		tokensStringList = tsl;		
// 		tokensString = ts;
// 	}
// 	
// }


import java.util.HashMap;
import java.util.stream.Collectors;
import java.util.stream.IntStream;
import javax.script.ScriptEngine;
import factValuePackage.*;
import ruleParser.Tokens;
	@Override
	public LineType getLineType()
	{
		return LineType.VALUE_CONCLUSION;
	}
	
	@SuppressWarnings("unchecked")
	@Override
	public FactValue selfEvaluate(HashMap<String, FactValue> workingMemory, ScriptEngine nashorn)
	{
		FactValue fv = null;
		/*
		 * Negation and Known type are a part of dependency 
		 * hence, only checking its variableName value against the workingMemory is necessary.
		 * type is as follows;
		 *	1. the rule is a plain statement
		 *	2. the rule is a statement of 'A IS B'
		 * 	3. the rule is a statement of 'A IS IN LIST: B'
		 * 	4. the rule is a statement of 'needs(wants) A'. this is from a child node of ExprConclusionLine type 
		 */
		
		if(!this.isPlainStatementFormat)
		{
			if(tokens.tokensList.stream().anyMatch((s) -> s.equals("IS")))
			{
				fv = this.value;
			}
			else if(tokens.tokensList.stream().anyMatch((s) -> s.equals("IS IN LIST:")))
			{
				boolean lineValue = false;
// Path: src/ruleParser/Tokens.java
// public class Tokens 
// {
// 	public List<String> tokensList;
// 	public List<String> tokensStringList;
// 	public String tokensString;
// 	
// 	public Tokens(List<String> tl, List<String> tsl, String ts) {
// 		tokensList = tl;
// 		tokensStringList = tsl;		
// 		tokensString = ts;
// 	}
// 	
// }


// Path: src/nodePackage/ValueConclusionLine.java
import java.util.HashMap;
import java.util.stream.Collectors;
import java.util.stream.IntStream;
import javax.script.ScriptEngine;
import factValuePackage.*;
import ruleParser.Tokens;

	@Override
	public LineType getLineType()
	{
		return LineType.VALUE_CONCLUSION;
	}
	
	@SuppressWarnings("unchecked")
	@Override
	public FactValue selfEvaluate(HashMap<String, FactValue> workingMemory, ScriptEngine nashorn)
	{
		FactValue fv = null;
		/*
		 * Negation and Known type are a part of dependency 
		 * hence, only checking its variableName value against the workingMemory is necessary.
		 * type is as follows;
		 *	1. the rule is a plain statement
		 *	2. the rule is a statement of 'A IS B'
		 * 	3. the rule is a statement of 'A IS IN LIST: B'
		 * 	4. the rule is a statement of 'needs(wants) A'. this is from a child node of ExprConclusionLine type 
		 */
		
		if(!this.isPlainStatementFormat)
		{
			if(tokens.tokensList.stream().anyMatch((s) -> s.equals("IS")))
			{
				fv = this.value;
			}
			else if(tokens.tokensList.stream().anyMatch((s) -> s.equals("IS IN LIST:")))
			{
				boolean lineValue = false;
				String listName = this.getFactValue().getValue().toString();