Package edu.uky.ai.io
Class List
java.lang.Object
edu.uky.ai.io.Node
edu.uky.ai.io.List
public class List extends Node
A list is a collection of 0 to many nodes.
- Author:
- Stephen G. Ware
-
Field Summary
-
Method Summary
Modifier and Type Method Description Node
requireFirst()
Returns the first element in the list or throws an exception if no such element exists.java.lang.String
toString()
-
Field Details
-
Method Details
-
requireFirst
Returns the first element in the list or throws an exception if no such element exists.- Returns:
- the first element
- Throws:
FormatException
- if the list does not have a first element
-
toString
public java.lang.String toString()- Overrides:
toString
in classjava.lang.Object
-