f00f.net.irc.martyr
Interface Mode

All Known Implementing Classes:
GenericMode

public interface Mode

Any class which is to represent a mode must implement this interface. They must also implement equals(...) so that if the parameter for either mode is null they are equal based on the character, and if both parameters are not null, base the equal on the character and the parameters being equal.


Inner Class Summary
static class Mode.Sign
          Finally, the Sign enumeration.
 
Method Summary
 char getChar()
          The character that represents this mode (ie o for operator)
 java.lang.String getParam()
          Returns the parameter that was set with setParam(...)
 Mode.Sign getSign()
           
 Mode newInstance()
          A Mode can be constructed and asked to make copies of itself.
 boolean onePerChannel()
          Determines if there can be multiple versions of this mode in the channel.
 boolean recordInChannel()
          This mode should be recorded in the list of channel modes.
 boolean requiresParam()
          Should return true if this mode requires a parameter.
 void setParam(java.lang.String str)
          Sets the parameter that can be retrieved with getParam()
 void setSign(Mode.Sign sign)
          Sets the sign of the operation.
 

Method Detail

newInstance

public Mode newInstance()
A Mode can be constructed and asked to make copies of itself.

getChar

public char getChar()
The character that represents this mode (ie o for operator)

requiresParam

public boolean requiresParam()
Should return true if this mode requires a parameter.

recordInChannel

public boolean recordInChannel()
This mode should be recorded in the list of channel modes. This would NOT include such things as operator status, as it is recored with the Member object.

onePerChannel

public boolean onePerChannel()
Determines if there can be multiple versions of this mode in the channel.

getParam

public java.lang.String getParam()
Returns the parameter that was set with setParam(...)

setParam

public void setParam(java.lang.String str)
Sets the parameter that can be retrieved with getParam()

setSign

public void setSign(Mode.Sign sign)
Sets the sign of the operation. Must be positive (granting), negative (revoking) or nosign (neutral operation).

getSign

public Mode.Sign getSign()
Returns:
the sign of this mode.


Copyright © 2000,2001,2002,2003 f00f networks.