java.lang.ObjectUzel
public class Uzel
Trida Uzel implementuje uzel binarniho vyhledavaciho stromu problemu kanibalu a misionaru
Constructor Summary | |
---|---|
Uzel(byte misionari,
byte kanibalove,
boolean lod,
Uzel predek)
|
Method Summary | |
---|---|
void |
generujSyny()
Generates all posible sons (object of type Uzel) and stores references to them into the synove[] |
byte |
getKanibalove()
|
boolean |
getLod()
|
byte |
getMisionari()
|
Uzel |
getPredek()
|
Uzel |
getSyn(byte i)
|
byte |
pocetSynu()
Returns String representing the state |
java.lang.String |
toString()
Returns String representing the state |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Uzel(byte misionari, byte kanibalove, boolean lod, Uzel predek)
kanibalove
- pocet kanibalumisionari
- pocet misionarulod
- Pravda, pokud je lod na prvnim brehuMethod Detail |
---|
public void generujSyny()
public byte getKanibalove()
public boolean getLod()
public byte getMisionari()
public Uzel getPredek()
public Uzel getSyn(byte i)
public byte pocetSynu()
public java.lang.String toString()
toString
in class java.lang.Object