Class GenericIntermediateResultBlockBuilderImpl
java.lang.Object
se.liu.ida.hefquin.engine.queryplan.executable.impl.GenericIntermediateResultBlockBuilderImpl
- All Implemented Interfaces:
IntermediateResultBlockBuilder
public class GenericIntermediateResultBlockBuilderImpl
extends Object
implements IntermediateResultBlockBuilder
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(SolutionMapping element) Adds the given result element to the currently-created block.Finishes the creation of the currently-created block and returns this block.intReturns the current size of the currently-created block.voidStarts creating a newIntermediateResultBlock.
-
Field Details
-
block
-
-
Constructor Details
-
GenericIntermediateResultBlockBuilderImpl
public GenericIntermediateResultBlockBuilderImpl()
-
-
Method Details
-
startNewBlock
public void startNewBlock()Description copied from interface:IntermediateResultBlockBuilderStarts creating a newIntermediateResultBlock. If creating the previous block has not been completed by callingIntermediateResultBlockBuilder.finishCurrentBlock(), then everything that was added into that uncompleted block will be discarded.- Specified by:
startNewBlockin interfaceIntermediateResultBlockBuilder
-
add
Description copied from interface:IntermediateResultBlockBuilderAdds the given result element to the currently-created block. If no block was started so far or this is the first call of this method afterIntermediateResultBlockBuilder.finishCurrentBlock()was called, then a new block will be started first (i.e.,IntermediateResultBlockBuilder.startNewBlock()will be called internally).- Specified by:
addin interfaceIntermediateResultBlockBuilder
-
sizeOfCurrentBlock
public int sizeOfCurrentBlock()Description copied from interface:IntermediateResultBlockBuilderReturns the current size of the currently-created block. If no block was started so far or this is the first call of this method afterIntermediateResultBlockBuilder.finishCurrentBlock()was called, then this method returns 0 (zero).- Specified by:
sizeOfCurrentBlockin interfaceIntermediateResultBlockBuilder
-
finishCurrentBlock
Description copied from interface:IntermediateResultBlockBuilderFinishes the creation of the currently-created block and returns this block.- Specified by:
finishCurrentBlockin interfaceIntermediateResultBlockBuilder
-