|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectinfrastructure.Sorter
public class Sorter
Sorts agents based on their age
Field Summary | |
---|---|
int |
age
|
int |
id
|
Constructor Summary | |
---|---|
Sorter(int _id,
int _age)
|
Method Summary | |
---|---|
int |
compareTo(java.lang.Object anotherAgent)
|
int |
getAge()
|
int |
getId()
|
void |
setAge(int age)
|
void |
setId(int id)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public int age
public int id
Constructor Detail |
---|
public Sorter(int _id, int _age)
Method Detail |
---|
public int compareTo(java.lang.Object anotherAgent) throws java.lang.ClassCastException
compareTo
in interface java.lang.Comparable
java.lang.ClassCastException
public int getAge()
public void setAge(int age)
public int getId()
public void setId(int id)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |