please read below it will tell you what we are using /** * LinkedList.java * * Replace all //TODO tags with your code * * Note that below the "//TODO" tag there may be * something like "return null;", "return 0;", etc. * That line is just "stubbed in" so the class * will compile. When you add your code (one or many * statements), you will want to delete the "stubbed" line. * By "stubbed in" we mean "mocked" or "faked in" temporarily. * * When testing, construct using the static factory methods: LinkedList.newEmpty() LinkedList.from(arrayElements) */ package model.list; import java.lang.reflect.Array; import java.util.concurrent.atomic.AtomicInteger; import java.util.function.BiFunction; import java.util.function.Consumer; import java.util.function.Function; import model.linearpub.DynamicList; import model.linearpub.StructureIterator; //This class is NOT java.util.LinkedList public class LinkedList<E> implements DynamicList<E> { //--------------------------------- // Instance Variables //TODO - declare instance variable(s) //--------------------------------- // Private Constructor /** Constructs and returns new LinkedList (no args constructor) */ private LinkedList() { } //-------------------- List Statistics --------------------- /** * Return number of elements in this list. */ @Override public int size() { //TODO return 0; } /** * Return true is this list contains no elements. */ @Override public boolean isEmpty() { //TODO return false; } //------------------ Accessing Elements -------------------- /** * Return element at given index. * Throws IndexOutOfBoundsException if passed index is invalid. */ @Override public E get(int index) { //TODO return null; } /** * Return first element * Throws RuntimeException if list is empty */ @Override public E first() { //TODO return null; } /** * Return last element * Throws RuntimeException if list is empty */ @Override public E last() { //TODO return null; } /** * Return a new list containing the elements of this list * between the given index "start" (inclusive) and * the given index "stop" (exclusive). * Throws IndexOutOfBoundsException if either passed index is invalid. */ @Override public DynamicList<E> subList(int start, int stop) { //TODO return null; } /** * Return index of first matching element (where searchFct outputs true) * Return -1 if no match * Example usage (first list of integers, then employees): * index = list.find(eaInteger -> eaInteger == 10); * index = employeeList.find(employee -> employee .getFirstName().equals("Kofi")); */ @Override public int findFirst(Function<E, Boolean> searchFct) { //TODO return 0; } /** * Return index of last matching element (where searchFct outputs true) * E.g., if searching for employee with name "Kofi" and there is a match * at index=3 and index=8, findLast will return 8 (the last matching index). * Hint: start search at end of list and work backwards through list. * Return -1 if no match */ @Override public int findLast(Function<E, Boolean> searchFct.