Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Iterator;
- public interface Tree extends Iterable{
- Position root();
- Position parent(Position p) throws IllegalArgumentException;
- Iterable<Position> children(Position p) throws IllegalArgumentException;
- int numChildren(Position p) throws IllegalArgumentException;
- boolean isInternal(Position p) throws IllegalArgumentException;
- boolean isExternal(Position p) throws IllegalArgumentException;
- boolean isRoot(Position p) throws IllegalArgumentException;
- int size();
- boolean isEmpty();
- Iterator iterator();
- Iterable<Position> positions();
- public Position replace(Position p, String e)throws IllegalArgumentException;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement