sg.edu.nus.comp.nlp.ims.corpus
Class ASentence

java.lang.Object
  extended by sg.edu.nus.comp.nlp.ims.corpus.ASentence
All Implemented Interfaces:
java.lang.Cloneable, ISentence
Direct Known Subclasses:
CSentence

public abstract class ASentence
extends java.lang.Object
implements ISentence

superclass of sentence.

Author:
zhongzhi

Field Summary
protected  java.util.ArrayList<IItem> m_Items
           
protected  java.util.Hashtable<java.lang.String,java.lang.String> m_Values
           
 
Constructor Summary
ASentence()
          default constructor
 
Method Summary
 void clear()
          clear the sentence
 java.lang.String get(java.lang.String p_Key)
          get parameter
 IItem getItem(int p_Index)
          get Item of p_Index if p_Index is out of range, return null
 boolean set(java.lang.String p_Key, java.lang.String p_Value)
          set parameter
 int size()
          get length of this sentence
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface sg.edu.nus.comp.nlp.ims.corpus.ISentence
appendItem
 

Field Detail

m_Items

protected java.util.ArrayList<IItem> m_Items

m_Values

protected java.util.Hashtable<java.lang.String,java.lang.String> m_Values
Constructor Detail

ASentence

public ASentence()
default constructor

Method Detail

clear

public void clear()
Description copied from interface: ISentence
clear the sentence

Specified by:
clear in interface ISentence

getItem

public IItem getItem(int p_Index)
Description copied from interface: ISentence
get Item of p_Index if p_Index is out of range, return null

Specified by:
getItem in interface ISentence
Parameters:
p_Index - item index
Returns:
item

get

public java.lang.String get(java.lang.String p_Key)
Description copied from interface: ISentence
get parameter

Specified by:
get in interface ISentence
Parameters:
p_Key - parameter key
Returns:
parameter value

set

public boolean set(java.lang.String p_Key,
                   java.lang.String p_Value)
Description copied from interface: ISentence
set parameter

Specified by:
set in interface ISentence
Parameters:
p_Key - parameter key
p_Value - parameter value
Returns:
success or not

size

public int size()
Description copied from interface: ISentence
get length of this sentence

Specified by:
size in interface ISentence
Returns:
size

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object