Search in sources :

Example 1 with Node

use of org.snakeyaml.engine.v2.nodes.Node in project psu172 by basit388.

the class Tester method main.

public static void main(String[] s) {
    Node k1 = new Node();
    k1.val = 10;
    Node k2 = new Node(20);
    Node k3 = k2;
    System.out.println(k1.val);
    System.out.println(k2.val);
    System.out.println(k3.val);
}
Also used : Node(Nodes.Node)

Example 2 with Node

use of org.snakeyaml.engine.v2.nodes.Node in project psu172 by basit388.

the class Tester3 method main.

public static void main(String[] s) {
    Node k1 = new Node(10);
    k1.next = new Node(20);
    // Temp Node
    Node temp = k1;
    System.out.println(temp.val);
    // moving Temp to next node in the chain
    temp = temp.next;
    System.out.println(temp.val);
}
Also used : Node(Nodes.Node)

Example 3 with Node

use of org.snakeyaml.engine.v2.nodes.Node in project psu172 by basit388.

the class Tester4 method main.

public static void main(String[] s) {
    Node k1 = new Node(10);
    k1.next = new Node(20);
    k1.next.next = new Node(30);
    // Temp Node
    Node temp = k1;
    System.out.println(temp.val);
    // moving Temp to next node in the chain
    temp = temp.next;
    System.out.println(temp.val);
    temp = temp.next;
    System.out.println(temp.val);
}
Also used : Node(Nodes.Node)

Example 4 with Node

use of org.snakeyaml.engine.v2.nodes.Node in project psu172 by basit388.

the class Tester5 method main.

public static void main(String[] s) {
    Node k1 = new Node(10);
    k1.next = new Node(20);
    k1.next.next = new Node(30);
    // Temp Node
    Node temp = k1;
    while (temp != null) {
        System.out.println(temp.val);
        temp = temp.next;
    }
}
Also used : Node(Nodes.Node)

Example 5 with Node

use of org.snakeyaml.engine.v2.nodes.Node in project psu172 by basit388.

the class Tester6 method main.

public static void main(String[] s) {
    int SIZE = 10;
    Node Head = new Node(1);
    Node temp = Head;
    for (int i = 2; i < SIZE; i++) {
        temp.next = new Node(i);
        temp = temp.next;
    }
    // Head points to the first node in the chain
    // Its important not to loose the head reference
    // Lets see what was created using Head.
    // Again work with a temp reference
    temp = Head;
    while (temp != null) {
        System.out.println(temp.val);
        temp = temp.next;
    }
}
Also used : Node(Nodes.Node)

Aggregations

Node (org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node)160 FlowCapableNode (org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNode)89 Nodes (org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.Nodes)79 NodeKey (org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeKey)78 NodeId (org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId)61 TableKey (org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.TableKey)35 Flow (org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow)35 FlowId (org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowId)34 FlowKey (org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.FlowKey)33 ArrayList (java.util.ArrayList)27 NodeBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeBuilder)25 Test (org.junit.Test)23 NodeRef (org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeRef)23 Uint64 (org.opendaylight.yangtools.yang.common.Uint64)22 ExecutionException (java.util.concurrent.ExecutionException)20 ReadTransaction (org.opendaylight.mdsal.binding.api.ReadTransaction)16 List (java.util.List)15 MatchInfo (org.opendaylight.genius.mdsalutil.MatchInfo)15 ListenableFuture (com.google.common.util.concurrent.ListenableFuture)14 LogicalDatastoreType (org.opendaylight.mdsal.common.api.LogicalDatastoreType)13