cz.cuni.amis.pogamut.sposh.engine
Class FireResult

Package class diagram package FireResult
java.lang.Object
  extended by cz.cuni.amis.pogamut.sposh.engine.FireResult

public final class FireResult
extends Object

Result of ElementExecutors, it specified how should be drive stack modified. Only FOLLOW requires specification of nextElement.

Author:
Honza

Nested Class Summary
static class FireResult.Type
          Value returned by the executor of an element on the stack, it determines how should drive stack be modified.
 
Constructor Summary
protected FireResult(FireResult.Type type)
          Create result for modification of stack, the getNextElement() is null.
protected FireResult(FireResult.Type type, cz.cuni.amis.pogamut.sposh.engine.StackElement nextElement)
          Create structure saying how the should be the drive stack modified.
 
Method Summary
 cz.cuni.amis.pogamut.sposh.engine.StackElement getNextElement()
          Get element that should be put at the top of the stack.
 FireResult.Type getType()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FireResult

protected FireResult(FireResult.Type type)
Create result for modification of stack, the getNextElement() is null.

Parameters:
type - How should be stack modified, not FireResult.Type.FOLLOW.

FireResult

protected FireResult(FireResult.Type type,
                     cz.cuni.amis.pogamut.sposh.engine.StackElement nextElement)
Create structure saying how the should be the drive stack modified. Example: Follow + some element of stack will result in stack of drive adding the elemnet of stack on the top of the stack.

Parameters:
type - How should be stack of drive modified.
nextElement - What should getNextElement() be.
Method Detail

getType

public FireResult.Type getType()
Returns:
How should stack be modified?

getNextElement

public cz.cuni.amis.pogamut.sposh.engine.StackElement getNextElement()
Get element that should be put at the top of the stack. This method can be called only if getType() is FireResult.Type.FOLLOW.

Returns:
the nextElement that be added to the top of the stack


Copyright © 2014 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.