00001 00005 package edu.mit.csail.sdg.squander.examples.list.func; 00006 00007 import edu.mit.csail.sdg.annotations.Returns; 00008 import edu.mit.csail.sdg.annotations.SpecField; 00009 00010 @SpecField({ 00011 "next : one List | this.next = this.rest" 00012 }) 00013 public class Cons extends IntList { 00014 00015 final int key; 00016 final IntList rest; 00017 00018 public Cons(int key, IntList rest) { 00019 this.key = key; 00020 this.rest = rest; 00021 } 00022 00023 @Returns("this.key") 00024 public int key() { return key; } 00025 } 00026