Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Open Source License 

import java.util.*;

import org.w3c.dom.*;

public class Main {
    private static final String REF_ID = "refId";

    /**
     * Adds a reference for the given object to the references map if it has a refId
     *
     * @author Tristan Bepler
     */
    private static void addReference(Element cur, Map<Integer, Object> references, Object o) {
        if (cur.hasAttribute(REF_ID)) {
            int id = Integer.parseInt(cur.getAttribute(REF_ID));
            references.put(id, o);
        }
    }
}