// Path: main/java/com/biscuit/ColorCodes.java
// public class ColorCodes {
// 
// 	// with normal background
// 	public static final String RESET = "\u001B[0m";
// 	public static final String BLACK = "\u001B[30;1m";
// 	public static final String RED = "\u001B[31;1m";
// 	public static final String GREEN = "\u001B[32;1m";
// 	public static final String YELLOW = "\u001B[33;1m";
// 	public static final String BLUE = "\u001B[34;1m";
// 	public static final String PURPLE = "\u001B[35;1m";
// 	public static final String CYAN = "\u001B[36;1m";
// 	public static final String WHITE = "\u001B[37;1m";
// 
// 	// with black background
// 	public static final String B_RESET = "\u001B[0m";
// 	public static final String B_BLACK = "\u001B[30;40;1m";
// 	public static final String B_RED = "\u001B[31;40;1m";
// 	public static final String B_GREEN = "\u001B[32;40;1m";
// 	public static final String B_YELLOW = "\u001B[33;40;1m";
// 	public static final String B_BLUE = "\u001B[34;40;1m";
// 	public static final String B_PURPLE = "\u001B[35;40;1m";
// 	public static final String B_CYAN = "\u001B[36;40;1m";
// 	public static final String B_WHITE = "\u001B[37;40;1m";
// 
// }
// 
// Path: main/java/com/biscuit/commands/Command.java
// public interface Command {
// 
// 	boolean execute() throws IOException;
// }
// 
// Path: main/java/com/biscuit/models/Task.java
// public class Task {
// 
// 	public transient Project project;
// 
// 	public String title;
// 	public String description;
// 	public Status state;
// 	public Date initiatedDate = null;
// 	public Date plannedDate = null;
// 	public Date dueDate = null;
// 	public float estimatedTime;
// 
// 	public static String[] fields;
// 
// 	List<Bug> bugs;
// 	List<Test> tests;
// 
// 	static {
// 		fields = new String[8];
// 		fields[0] = "title";
// 		fields[1] = "description";
// 		fields[2] = "state";
// 		fields[3] = "initiated_date";
// 		fields[4] = "planned_date";
// 		fields[5] = "due_date";
// 		fields[6] = "estimated_time";
// 	}
// 
// 
// 	public void save() {
// 		project.save();
// 	}
// }
// 
// Path: main/java/com/biscuit/models/UserStory.java
// public class UserStory {
// 
// 	public transient Project project;
// 
// 	public String title;
// 	public String description;
// 	public Status state;
// 	public BusinessValue businessValue;
// 	public Date initiatedDate = null;
// 	public Date plannedDate = null;
// 	public Date dueDate = null;
// 	public int points;
// 
// 	public static String[] fields;
// 
// 	public List<Task> tasks = new ArrayList<>();
// 	public List<Bug> bugs = new ArrayList<>();
// 	public List<Test> tests = new ArrayList<>();
// 
// 	static {
// 		fields = new String[] { "title", "description", "state", "business_value", "initiated_date", "planned_date", "due_date", "tasks", "points" };
// 	}
// 
// 
// 	public void save() {
// 		project.save();
// 	}
// 
// }
// 
// Path: main/java/com/biscuit/models/services/DateService.java
// public class DateService {
// 
// 	public static transient SimpleDateFormat dateFormat = new SimpleDateFormat("MMM. dd, yyyy");
// 
// 
// 	public static boolean isSet(Date d) {
// 		return (d.compareTo(new Date(0)) > 0);
// 	}
// 
// 
// 	public static String getDateAsString(Date d) {
// 		if (DateService.isSet(d)) {
// 			return DateService.dateFormat.format(d);
// 		}
// 		return "Not set yet";
// 	}
// 
// }


import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.stream.Collectors;
import com.biscuit.ColorCodes;
import com.biscuit.commands.Command;
import com.biscuit.models.Task;
import com.biscuit.models.UserStory;
import com.biscuit.models.services.DateService;
import de.vandermeer.asciitable.v2.RenderedTable;
import de.vandermeer.asciitable.v2.V2_AsciiTable;
import de.vandermeer.asciitable.v2.render.V2_AsciiTableRenderer;
import de.vandermeer.asciitable.v2.render.WidthLongestLine;
import de.vandermeer.asciitable.v2.themes.V2_E_TableThemes;
package com.biscuit.commands.task;




public class ListTasks implements Command {

	UserStory userStory = null;
	String title = "";
	boolean isFilter = false;
	boolean isSort = false;
	static boolean isReverse = false;
	private String filterBy;
	private String sortBy;
	private static String lastSortBy = "";


// Path: main/java/com/biscuit/ColorCodes.java
// public class ColorCodes {
// 
// 	// with normal background
// 	public static final String RESET = "\u001B[0m";
// 	public static final String BLACK = "\u001B[30;1m";
// 	public static final String RED = "\u001B[31;1m";
// 	public static final String GREEN = "\u001B[32;1m";
// 	public static final String YELLOW = "\u001B[33;1m";
// 	public static final String BLUE = "\u001B[34;1m";
// 	public static final String PURPLE = "\u001B[35;1m";
// 	public static final String CYAN = "\u001B[36;1m";
// 	public static final String WHITE = "\u001B[37;1m";
// 
// 	// with black background
// 	public static final String B_RESET = "\u001B[0m";
// 	public static final String B_BLACK = "\u001B[30;40;1m";
// 	public static final String B_RED = "\u001B[31;40;1m";
// 	public static final String B_GREEN = "\u001B[32;40;1m";
// 	public static final String B_YELLOW = "\u001B[33;40;1m";
// 	public static final String B_BLUE = "\u001B[34;40;1m";
// 	public static final String B_PURPLE = "\u001B[35;40;1m";
// 	public static final String B_CYAN = "\u001B[36;40;1m";
// 	public static final String B_WHITE = "\u001B[37;40;1m";
// 
// }
// 
// Path: main/java/com/biscuit/commands/Command.java
// public interface Command {
// 
// 	boolean execute() throws IOException;
// }
// 
// Path: main/java/com/biscuit/models/Task.java
// public class Task {
// 
// 	public transient Project project;
// 
// 	public String title;
// 	public String description;
// 	public Status state;
// 	public Date initiatedDate = null;
// 	public Date plannedDate = null;
// 	public Date dueDate = null;
// 	public float estimatedTime;
// 
// 	public static String[] fields;
// 
// 	List<Bug> bugs;
// 	List<Test> tests;
// 
// 	static {
// 		fields = new String[8];
// 		fields[0] = "title";
// 		fields[1] = "description";
// 		fields[2] = "state";
// 		fields[3] = "initiated_date";
// 		fields[4] = "planned_date";
// 		fields[5] = "due_date";
// 		fields[6] = "estimated_time";
// 	}
// 
// 
// 	public void save() {
// 		project.save();
// 	}
// }
// 
// Path: main/java/com/biscuit/models/UserStory.java
// public class UserStory {
// 
// 	public transient Project project;
// 
// 	public String title;
// 	public String description;
// 	public Status state;
// 	public BusinessValue businessValue;
// 	public Date initiatedDate = null;
// 	public Date plannedDate = null;
// 	public Date dueDate = null;
// 	public int points;
// 
// 	public static String[] fields;
// 
// 	public List<Task> tasks = new ArrayList<>();
// 	public List<Bug> bugs = new ArrayList<>();
// 	public List<Test> tests = new ArrayList<>();
// 
// 	static {
// 		fields = new String[] { "title", "description", "state", "business_value", "initiated_date", "planned_date", "due_date", "tasks", "points" };
// 	}
// 
// 
// 	public void save() {
// 		project.save();
// 	}
// 
// }
// 
// Path: main/java/com/biscuit/models/services/DateService.java
// public class DateService {
// 
// 	public static transient SimpleDateFormat dateFormat = new SimpleDateFormat("MMM. dd, yyyy");
// 
// 
// 	public static boolean isSet(Date d) {
// 		return (d.compareTo(new Date(0)) > 0);
// 	}
// 
// 
// 	public static String getDateAsString(Date d) {
// 		if (DateService.isSet(d)) {
// 			return DateService.dateFormat.format(d);
// 		}
// 		return "Not set yet";
// 	}
// 
// }


// Path: main/java/com/biscuit/commands/task/ListTasks.java
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.stream.Collectors;
import com.biscuit.ColorCodes;
import com.biscuit.commands.Command;
import com.biscuit.models.Task;
import com.biscuit.models.UserStory;
import com.biscuit.models.services.DateService;
import de.vandermeer.asciitable.v2.RenderedTable;
import de.vandermeer.asciitable.v2.V2_AsciiTable;
import de.vandermeer.asciitable.v2.render.V2_AsciiTableRenderer;
import de.vandermeer.asciitable.v2.render.WidthLongestLine;
import de.vandermeer.asciitable.v2.themes.V2_E_TableThemes;

package com.biscuit.commands.task;




public class ListTasks implements Command {

	UserStory userStory = null;
	String title = "";
	boolean isFilter = false;
	boolean isSort = false;
	static boolean isReverse = false;
	private String filterBy;
	private String sortBy;
	private static String lastSortBy = "";


	public ListTasks(UserStory userStory, String title) {