* return the top entity. A stack underflow or overflow will
* be thrown if the index is out of range.
*/
public IREntity getes(int i) throws RulesException{
if(i>=entitystkptr){
throw new RulesException(
"Entity Stack Overflow", "getes",
"index out of range: "+i);
}
if(i<0){
throw new RulesException(
"Entity Stack Underflow", "getes",
"index out of range: "+i);
}
return entitystk[i];
}