public class PigDisguise extends AgeableDisguise
Constructor and Description |
---|
PigDisguise()
Creates an instance.
|
PigDisguise(boolean adult,
boolean saddled)
Creates an instance.
|
Modifier and Type | Method and Description |
---|---|
PigDisguise |
clone()
Creates and returns a copy of this object.
|
boolean |
equals(java.lang.Object object)
Indicates whether some other object is "equal to" this one.
|
boolean |
isSaddled()
Gets whether the pig is saddled.
|
void |
setSaddled(boolean saddled)
Sets whether the pig is saddled.
|
java.lang.String |
toString()
Returns a string representation of the object.
|
isAdult, setAdult
getCustomName, setCustomName
public PigDisguise()
public PigDisguise(boolean adult, boolean saddled)
adult
- should the disguise be an adultsaddled
- should the disguise be saddledpublic boolean isSaddled()
true
if the pig is saddledpublic void setSaddled(boolean saddled)
saddled
- should the pig be saddledpublic PigDisguise clone()
clone
in class AgeableDisguise
public boolean equals(java.lang.Object object)
equals
in class AgeableDisguise
true
if this object is the same as the object
argument; false
otherwisepublic java.lang.String toString()
toString
in class AgeableDisguise