|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.rice.comp211.laundry.garment.SameTypeGarmentVisitor
public class SameTypeGarmentVisitor
A visitor to a Garment that returns true if the other garment is the same type as the host, i.e. Shirt, Pants, Socks or NullGarment. False is returned otherwise. The adjective is ignored.
Constructor Summary | |
---|---|
SameTypeGarmentVisitor(Garment other)
Constructor for the class |
Method Summary | |
---|---|
Boolean |
forNullGarment(NullGarment g)
NullGarment case of the visitor |
Boolean |
forPants(Pants p)
Pants case of the visitor |
Boolean |
forShirt(Shirt s)
Shirt case of the visitor |
Boolean |
forSocks(Socks s)
Socks case of the visitor |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SameTypeGarmentVisitor(Garment other)
other
- The other Garment to compare againstMethod Detail |
---|
public Boolean forShirt(Shirt s)
GarmentVisitor
forShirt
in interface GarmentVisitor<Boolean>
s
- The Shirt host
public Boolean forPants(Pants p)
GarmentVisitor
forPants
in interface GarmentVisitor<Boolean>
p
- The Pants host
public Boolean forSocks(Socks s)
GarmentVisitor
forSocks
in interface GarmentVisitor<Boolean>
s
- The Socks host
public Boolean forNullGarment(NullGarment g)
GarmentVisitor
forNullGarment
in interface GarmentVisitor<Boolean>
g
- The NullGarment host
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |