001package daikon.diff; 002 003import org.checkerframework.dataflow.qual.Pure; 004import org.plumelib.util.IPair; 005 006/** The root of the tree. All its children are PptNodes. */ 007public class RootNode extends Node<Void, PptNode> { 008 009 /** Creates a new RootNode object. */ 010 @SuppressWarnings({"rawtypes", "unchecked"}) 011 public RootNode() { 012 super((IPair<Void, Void>) (IPair) IPair.of(new Object(), new Object())); 013 } 014 015 @Override 016 public IPair<Void, Void> getUserObject() { 017 throw new Error("Shouldn't ask for userObject for RootNode"); 018 } 019 020 @Pure 021 @Override 022 public Void getUserLeft() { 023 throw new Error("Shouldn't ask for userObject for RootNode"); 024 } 025 026 @Pure 027 @Override 028 public Void getUserRight() { 029 throw new Error("Shouldn't ask for userObject for RootNode"); 030 } 031 032 @Override 033 public void accept(Visitor v) { 034 v.visit(this); 035 } 036}