///
 ///<summary>The add method adds given {@link CacheNode} type input cacheNode to the beginning of the doubly
 /// {@link java.util.LinkedList}. First it sets cacheNode's previous node as null and cacheNode's next node as
 /// head node. If head node is not null then it assigns cacheNode's previous node as head node and if tail is
 /// null then it assigns cacheNode as tail.</summary>
 ///
 ///<param name="cacheNode"> {@link CacheNode} type input to add to the doubly {@link java.util.LinkedList}.</param>
 ///
 public void Add(CacheNode <TKey, TData> cacheNode)
 {
     cacheNode.SetPrevious(null);
     cacheNode.SetNext(_head);
     _head?.SetPrevious(cacheNode);
     _head = cacheNode;
     if (_tail == null)
     {
         _tail = cacheNode;
     }
 }