public interface IList<T>
Modifier and Type | Method and Description |
---|---|
boolean |
contains(T d)
Returns if the list contains a element
|
void |
delete(int pos)
Deletes a element of the list
|
void |
deleteAll()
Deletes every elements in the list
|
void |
drawDataType(java.lang.String path,
java.lang.Class clase)
Generates a PNG and a DOT file with a figure representing structure the
object
|
T |
elementAt(int pos)
Recovers a element of the list
|
int |
getCost()
Gets the cost of the last operation performed
|
void |
insert(int pos,
T element)
inserts a new element in a specific position in the list
|
void |
insert(T element)
Inserts a new element in the list
|
boolean |
isEmpty()
Checks if there are data in the list
|
java.util.Iterator<T> |
iterator()
Returns an iterator
|
int |
numElements()
Returns the number of elements in the list
|
int |
positionOfElement(T element)
Gets the position of one element
|
void |
setCapacity(int newCapacity)
Sets the capacity of the list
|
boolean |
swap(int p1,
int p2)
Swaps two elements of the list
|
boolean isEmpty()
int numElements()
void insert(T element)
element
- . Element to insertvoid insert(int pos, T element)
element
- . Element to insertpos
- . Position where to insert the elementboolean swap(int p1, int p2)
p1
- position of the list where is the first elementp2
- position of the list where is the second elementvoid delete(int pos)
pos
- position of the element to deletevoid deleteAll()
T elementAt(int pos)
pos
- position where the element to recover isint positionOfElement(T element)
element
- element to get its positionint getCost()
void setCapacity(int newCapacity)
newCapacity
- the new capacity of the listvoid drawDataType(java.lang.String path, java.lang.Class clase)
path
- the path where generate the DOT filejava.util.Iterator<T> iterator()
boolean contains(T d)
d
- element to check on the list