Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import java.util.List;
import java.util.Vector;

public class Main {
    public static <GPType> List<GPType> asList(final GPType node) {
        final List<GPType> list = new Vector<GPType>(1);
        list.add(node);
        return list;
    }

    public static <GPType> List<GPType> asList(final GPType node1, final GPType node2) {
        final List<GPType> list = new Vector<GPType>();
        list.add(node1);
        list.add(node2);
        return list;
    }
}