Class jkp.KifSeq
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class jkp.KifSeq

java.lang.Object
   |
   +----jkp.KifObj
           |
           +----jkp.KifSeq

public class KifSeq
extends KifObj
The class for KIF object sequence, such as term sequence, sentence sequence, etc. A very important class in this parser.
Author:
Xiaocheng LUAN

Constructor Index

 o KifSeq()
 o KifSeq(KifObj)
Create an instance of KifSeq with only one object in the sequence.
 o KifSeq(KifObj, KifSeq)
Create an instance of KifSeq with the given object as the first object in the sequence, and objects in the given sequence as the subsequent object in the sequence.
 o KifSeq(KifSeq, KifObj)
Append the given object to the given sequence to get a new sequence.
 o KifSeq(KifSeq)
Create a new copy of the given sequence.

Method Index

 o append(KifObj)
 o append(KifSeq)
 o car()
 o cdr()
 o isEmpty()
 o ithObj(int)
 o size()
 o toString()

Constructors

 o KifSeq
  public KifSeq()
 o KifSeq
  public KifSeq(KifObj obj)
Create an instance of KifSeq with only one object in the sequence.
Parameters:
obj - The only one object in the sequence.
 o KifSeq
  public KifSeq(KifObj obj,
                KifSeq seq)
Create an instance of KifSeq with the given object as the first object in the sequence, and objects in the given sequence as the subsequent object in the sequence.
Parameters:
obj - the first object in the created sequence.
seq - the objects of which will be the second part of the new sequence.
 o KifSeq
  public KifSeq(KifSeq seq,
                KifObj obj)
Append the given object to the given sequence to get a new sequence.
 o KifSeq
  public KifSeq(KifSeq seq)
Create a new copy of the given sequence.

Methods

 o ithObj
  public KifObj ithObj(int i) throws KifRTException
Returns:
return the ith Kif object in the sequence.
 o append
  public void append(KifObj obj)
 o append
  public void append(KifSeq seq)
 o isEmpty
  public boolean isEmpty()
 o car
  public KifObj car()
Returns:
Return the first element of the sequence.
 o cdr
  public KifSeq cdr()
Returns:
Return the subsquence(from 2nd element to end) of the sequence.
 o size
  public int size()
 o toString
  public String toString()
Overrides:
toString in class KifObj

All Packages  Class Hierarchy  This Package  Previous  Next  Index