Prolog Cafe v1.2

jp.ac.kobe_u.cs.prolog.lang
Class PushDownList

java.lang.Object
  extended by jp.ac.kobe_u.cs.prolog.lang.PushDownList
All Implemented Interfaces:
java.io.Serializable

public class PushDownList
extends java.lang.Object
implements java.io.Serializable

Push down List.
The class PushDownList represents a push down list.

See Also:
Serialized Form

Field Summary
protected  Term[] buffer
          An array of Term entries.
protected  int maxContents
          Maximum size of enties.
protected  int top
          the top index of this PushDownList.
 
Constructor Summary
PushDownList()
          Constructs a new pdl.
PushDownList(int n)
          Constructs a new pdl with the given size.
 
Method Summary
protected  void deleteAll()
          Discards all entries.
 boolean empty()
          Tests if this pdl has no entry.
 void init()
          Discards all entries.
 int max()
          Returns the value of maxContents.
 Term pop()
          Pops an entry from this PushDownList.
 void push(Term t)
          Pushs an entry to this PushDownList.
 void show()
          Shows the contents of this PushDownList.
 int top()
          Returns the value of top.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

maxContents

protected int maxContents
Maximum size of enties. Initial size is 10000.


buffer

protected Term[] buffer
An array of Term entries.


top

protected int top
the top index of this PushDownList.

Constructor Detail

PushDownList

public PushDownList()
Constructs a new pdl.


PushDownList

public PushDownList(int n)
Constructs a new pdl with the given size.

Method Detail

init

public void init()
Discards all entries.


push

public void push(Term t)
Pushs an entry to this PushDownList.


pop

public Term pop()
Pops an entry from this PushDownList.


deleteAll

protected void deleteAll()
Discards all entries.


empty

public boolean empty()
Tests if this pdl has no entry.


max

public int max()
Returns the value of maxContents.

See Also:
maxContents

top

public int top()
Returns the value of top.

See Also:
top

show

public void show()
Shows the contents of this PushDownList.


Prolog Cafe v1.2

Copyright (C) 1997-2008 M.BANBARA and N.TAMURA