package Progress; import java.util.Collection; /** * Expandable list type that will be displayed in the left side bar. */ public abstract class List{ private String name; private Collection topics; /** * Adds a link to the list. * pre: // The String topic must not equal null. topic != null && // The String topic must not be empty. !topic.isEmpty(); post: // The String topic is now in this.topics. topics'.contains(topic); * */ public void addToList(String topic) { boolean b = !topic.isEmpty(); topics.contains(topic); } /* SPEST PROBLEM: The checker outputs Invalid invocation: isEmpty() at line: 22 at character: 15 Invalid invocation: contains(antlr.TestGenerator$arguments_return@282492ec) at line: 26 at character: 16 but javac seems to be OK with these expressions. */ }