org.extendj.ast.SimpleSet Maven / Gradle / Ivy
package org.extendj.ast;
import java.util.Collection;
import java.util.Collections;
import java.util.HashSet;
import java.util.ArrayList;
import java.io.ByteArrayOutputStream;
import java.io.PrintStream;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.*;
import java.util.zip.*;
import java.io.*;
import java.io.BufferedInputStream;
import java.io.DataInputStream;
import org.jastadd.util.PrettyPrintable;
import org.jastadd.util.PrettyPrinter;
import java.io.FileNotFoundException;
import java.io.InputStream;
import org.jastadd.util.*;
import java.io.File;
import java.io.IOException;
import java.util.Set;
import beaver.*;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentSkipListMap;
/**
* @ast interface
* @aspect DataStructures
* @declaredat /home/jesper/git/extendj/java4/frontend/DataStructures.jrag:39
*/
interface SimpleSet extends Iterable {
int size();
boolean isEmpty();
SimpleSet add(T o);
Iterator iterator();
/** @return {@code true} if this set contains the given object. */
/** @return {@code true} if this set contains the given object. */
boolean contains(Object o);
/** @return {@code true} if this set is a singleton set (size == 1). */
/** @return {@code true} if this set is a singleton set (size == 1). */
boolean isSingleton();
/** @return {@code true} if this set is a singleton set containing the given object. */
/** @return {@code true} if this set is a singleton set containing the given object. */
boolean isSingleton(T o);
/** @return the single value in the set. Throws an error if the set is not a singleton. */
/** @return the single value in the set. Throws an error if the set is not a singleton. */
T singletonValue();
SimpleSet