org.kefirsf.bb.conf
Class Code

java.lang.Object
  extended by org.kefirsf.bb.conf.Code

public class Code
extends Object

Code description.

Author:
Vitaliy Samolovskih aka Kefir

Field Summary
static int DEFAULT_PRIORITY
           
 
Constructor Summary
Code()
          Construct code definition with random name and default priority.
Code(Pattern pattern, Template template, String name, int priority)
          Create code definition.
Code(String name)
          Construct code definition with name and default priority.
 
Method Summary
 boolean equals(Object o)
           
 String getName()
          Get code name
 Pattern getPattern()
          Get pattern for text parsing
 int getPriority()
           
 Template getTemplate()
          Get template for text generation.
 int hashCode()
           
 void setName(String name)
          Set code name.
 void setPattern(Pattern pattern)
          Set pattern for text parsing
 void setPriority(int priority)
           
 void setTemplate(Template template)
          Set template for text generation
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_PRIORITY

public static final int DEFAULT_PRIORITY
See Also:
Constant Field Values
Constructor Detail

Code

public Code()
Construct code definition with random name and default priority.


Code

public Code(String name)
Construct code definition with name and default priority.

Parameters:
name - code name

Code

public Code(Pattern pattern,
            Template template,
            String name,
            int priority)
Create code definition.

Parameters:
pattern - text pattern for parsing
template - text generation template
name - code name
priority - code priority
Method Detail

getName

public String getName()
Get code name

Returns:
name of code

setName

public void setName(String name)
Set code name.

Parameters:
name - code name

getPriority

public int getPriority()
Returns:
code priority

setPriority

public void setPriority(int priority)
Parameters:
priority - code priority

getPattern

public Pattern getPattern()
Get pattern for text parsing

Returns:
pattern definition object

setPattern

public void setPattern(Pattern pattern)
Set pattern for text parsing

Parameters:
pattern - pattern definition object

getTemplate

public Template getTemplate()
Get template for text generation.

Returns:
template definition object

setTemplate

public void setTemplate(Template template)
Set template for text generation

Parameters:
template - template definition object

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2013. All Rights Reserved.