Class AndCondition
java.lang.Object
games.stendhal.server.entity.npc.condition.AndCondition
- All Implemented Interfaces:
ChatCondition,PreTransitionCondition
Is constructed from a group of conditions.
It evaluates to true, iff each condition evaluates to true.
-
Constructor Summary
ConstructorsConstructorDescriptionAndCondition(ChatCondition... condition) Creates a new "and"-condition.AndCondition(Iterable<ChatCondition> conditions) Creates a new "and"-condition.AndCondition(List<ChatCondition> conditions) Creates a new "and"-condition. -
Method Summary
-
Constructor Details
-
AndCondition
Creates a new "and"-condition.- Parameters:
condition- condition which should be and-ed.
-
AndCondition
Creates a new "and"-condition.- Parameters:
conditions- list of condition which should be and-ed.
-
AndCondition
Creates a new "and"-condition.- Parameters:
conditions- condition which should be and-ed.
-
-
Method Details
-
fire
Description copied from interface:PreTransitionConditioncan the transition be done?- Specified by:
firein interfaceChatCondition- Specified by:
firein interfacePreTransitionCondition- Parameters:
player- player who caused the transitionsentence- text he/she saidentity- the NPC doing the transition- Returns:
- true, if the transition is possible, false otherwise
-
toString
-
hashCode
public int hashCode() -
equals
-