|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcz.muni.fi.pb162.school.StudentImpl
public class StudentImpl
Tato třída implementuje rozhraní Student a reprezentuje studenta.
Constructor Summary | |
---|---|
StudentImpl(int id,
String name)
Vytvoří novou instanci třídy student s daným identifikátorem a jménem. |
Method Summary | |
---|---|
boolean |
equals(Object obj)
Zjišťuje, zdali je objekt obj stejným studentem. |
int |
getId()
Vrátí identifikátor studenta |
String |
getName()
Vrátí jméno studenta |
int |
hashCode()
Vrací hashovací kód studenta. |
String |
toString()
Vrací řetězec s informacemi o studentovi. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public StudentImpl(int id, String name)
id
- identifikátor vytvářeného studentaname
- jméno vytvářeného studentaMethod Detail |
---|
public String getName()
getName
in interface Student
public int getId()
getId
in interface Student
public boolean equals(Object obj)
equals
in interface Student
equals
in class Object
obj
- Objekt, se kterým se bude tento student porovnávat
public int hashCode()
hashCode
in interface Student
hashCode
in class Object
public String toString()
toString
in class Object
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |