// Path: src/bibtex/Assertions.java
// public class Assertions {
// 
//     public static final boolean ENABLE_EXPENSIVE_ASSERTIONS = true;
//     
// }


import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import bibtex.Assertions;
/*
 * Created on Mar 17, 2003
 *
 * @author henkel@cs.colorado.edu
 * 
 */
package bibtex.dom;



/**
 * This is the root of a bibtex DOM tree and the factory for any bibtex model -
 * the only way to create nodes. For an example, check out the documentation for
 * the constructor of BibtexNode.
 * 
 * @author henkel
 */
public final class BibtexFile extends BibtexNode {

    private final ArrayList entries = new ArrayList();

    public BibtexFile() {
        super(null);
    }

    public void addEntry(BibtexAbstractEntry entry) {
        assert entry != null : "entry parameter may not be null.";
// Path: src/bibtex/Assertions.java
// public class Assertions {
// 
//     public static final boolean ENABLE_EXPENSIVE_ASSERTIONS = true;
//     
// }


// Path: src/bibtex/dom/BibtexFile.java
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import bibtex.Assertions;

/*
 * Created on Mar 17, 2003
 *
 * @author henkel@cs.colorado.edu
 * 
 */
package bibtex.dom;



/**
 * This is the root of a bibtex DOM tree and the factory for any bibtex model -
 * the only way to create nodes. For an example, check out the documentation for
 * the constructor of BibtexNode.
 * 
 * @author henkel
 */
public final class BibtexFile extends BibtexNode {

    private final ArrayList entries = new ArrayList();

    public BibtexFile() {
        super(null);
    }

    public void addEntry(BibtexAbstractEntry entry) {
        assert entry != null : "entry parameter may not be null.";
        assert !Assertions.ENABLE_EXPENSIVE_ASSERTIONS || !this.entries.contains(entry) :