Esempio n. 1
0
 public void ChangeBetween(int Position, int Position2)
 {
     Node Node1 = new Node();
     Node Node2 = new Node();
     Node Copy2 = new Node();
     Node1 = FindSingular(Position);
     Node2 = FindSingular(Position2);
     Copy2 = Node2.ShallowCopy();
     Node2.valor = Node1.valor;
     Node1.valor = Copy2.valor;
 }
Esempio n. 2
0
 public void insertInto(int Position, string element)
 {
     Node Next = new Node(); ;
     Node Actual = new Node(); ;
     Actual = FindSingular(Position);
     Next = Actual.next;
     Node newNode = new Node();
     number++;
     newNode.valor = element;
     if(Actual.next == null)
     {
         Foot.next = newNode;
     }
     else if(Position < 1)
     {
         newNode.next = Head.ShallowCopy();
         Head = newNode;
         newNode = Actual;
     }
     else
     {
         newNode.next = Next;
     }
     Actual.next = newNode;
 }
Esempio n. 3
0
 public void insertIntoValue(string A_element, string element)
 {
     Node Next = new Node(); ;
     Node Actual = new Node(); ;
     Actual = FindValor(A_element);
     Next = Actual.next;
     Node newNode = new Node();
     number++;
     newNode.valor = element;
     if (Actual.next == null)
     {
         Foot.next = newNode;
     }
     else
     {
         newNode.next = Next;
     }
     Actual.next = newNode;
 }
Esempio n. 4
0
        public void insert(string element)
        {
            // Creating the node
            Node newNode = new Node();

            newNode.valor = element;
            if (head == null)
            {
                head = newNode;
            }
            else
            {
                Foot.next = newNode;
            }
            number++;
        }