【Java开源代码栏目提醒】:网学会员在Java开源代码频道为大家收集整理了WallEntry.java提供大家参考,希望对大家有所帮助!
package com.javapatterns.state.taoist;
public class WallEntry
{
public void setState(WallStateIF state)
{
this.state = state;
}
public void pass() throws WallEntryException
{
state.pass(this);
}
public void spell(String spell)throws WallEntryException
{
state.spell(this, spell);
}
/**
* @link aggregation
* @label Current State
*/
private WallStateIF state;
}