- getId() - Method in class Martian
-
Returns the id for this Martian.
- getMartianAt(int) - Method in class MartianManager
-
Returns the
ith Martian in
martians or
null if the index is invalid.
- getMartianClosestTo(int) - Method in class MartianManager
-
Returns the Martian in
martians that has an
id
closest to the input
id.
- getMartianClosestTo(Martian) - Method in class MartianManager
-
Returns the Martian in
martians that has an
id
closest to the input
Martian's
id.
- getMartianWithId(int) - Method in class MartianManager
-
Returns the Martian with id or null if not found.
- getNumMartians() - Method in class MartianManager
-
Returns the number of Martains in
martians.
- getNumTeleporters() - Method in class MartianManager
-
- getSortedMartians() - Method in class MartianManager
-
Returns a list of Martians sorted according to their id.
- getTeleporterAt(int) - Method in class MartianManager
-
Returns the
ith
Teleporter in
teleporters or
null
if the index is invalid.
- getTenacity() - Method in class RedMartian
-
Returns the tenacity of this Martian.
- getVolume() - Method in class Martian
-
Returns the volume for this Martian.
- GreenMartian - Class in prob1
-
This class models a GreenMartian which is a subclass of Martian
- GreenMartian(int, int) - Constructor for class GreenMartian
-
Creates a GreenMartian with the specified id and volume
- GreenMartian(int) - Constructor for class GreenMartian
-
Creates a GreenMartian with the specified id and volume is set to 1.
- groupSpeak() - Method in class MartianManager
-
Returns a string representing all the martians speaking.
- groupTeleport(String) - Method in class MartianManager
-
Returns a string representing all the teleporters teleporting to dest.