public class CrList
extends java.lang.Object
implements java.io.Serializable
Constructor and Description |
---|
CrList()
Constructor that creates an empty list.
|
Modifier and Type | Method and Description |
---|---|
void |
deleteListElement(CrListElement element)
Deletes the CrListElement out of the CrList
|
CrListElement |
getHead()
Gets the head of the CrList
|
CrListElement |
insertListElement(int num,
int value,
int i)
Inserts a new element at the end of the list and returns it.
|
boolean |
isEmpty()
Returns whether or not the CrList is empty.
|
CrListElement |
searchListElement(int num,
int value)
Searches for a CrListElement with the specified attribute number and
attribute value.
|
int[] |
searchListIndex(int num,
int value)
Gets the index and the minimum height of a CrListElement in a CrList
|
java.lang.String |
toString()
Returns a string description of the CrList
|
public CrListElement insertListElement(int num, int value, int i)
num
- The attribute number that is stored in a CrListElementvalue
- The attribute value that is stored in a CrListElementi
- the minimum heightpublic void deleteListElement(CrListElement element)
element
- The CrListElement to deletepublic boolean isEmpty()
public CrListElement getHead()
public java.lang.String toString()
toString
in class java.lang.Object
public CrListElement searchListElement(int num, int value)
num
- the attribute numbervalue
- the attribute valuepublic int[] searchListIndex(int num, int value)
num
- the attribute numbervalue
- the attribute value