Package fr.umlv.data

Examples of fr.umlv.data.Link


import fr.umlv.data.Link;
import fr.umlv.data.LinkedLink;

public class Main {
    public static void main(String[] args) {
        Link link = new Link("foo");
        LinkedLink ll = new LinkedLink(link);

        ll.add("bar");
        ll.add("baz");
        try {
            System.out.println(ll.contains(new Link("foo")));
            System.out.println(ll.contains(new Link("bar")));
            System.out.println(ll.contains(new Link("baz")));
            textSum(ll);
        } catch (Exception e) {
            System.out.println(e);
        }
    }
View Full Code Here


        }
    }

    private static int textSum(LinkedLink ll) {
        int counter = 0;
        Link link = ll.getHead();

        while (link.hasNext()) {
            counter += ((String) link.getValue()).length();
            link = link.getNext();
        }

        return counter;
    }
View Full Code Here

import fr.umlv.data.Link;
import fr.umlv.data.LinkedLink;

public class Main {
    public static void main(String[] args) {
        Link link = new Link("foo");

        LinkedLink ll = new LinkedLink(link);
        ll.add("bar");
        ll.add("baz");
        System.out.println(ll.toString());
View Full Code Here

TOP

Related Classes of fr.umlv.data.Link

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.