Class MaterialFragmentDescriptor<T>
java.lang.Object
com.amalgamasimulation.discreterate.MaterialFragmentDescriptor<T>
- Type Parameters:
T- type (class or interface) whose instances represent materials
MaterialFragmentDescriptor represents a portion of material mix that travels along a
Conveyor.
The most common usage scenario of a ConveyorRateRecord is initial of materials inside a new Conveyor.
- Author:
- Alexander Morozov
-
Constructor Summary
ConstructorsConstructorDescriptionMaterialFragmentDescriptor(double beginOffset, double endOffset, Accumulator<T> stock) Creates a newMaterialFragmentDescriptorinstance. -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns the begin relative offset the stock element described by thisMaterialFragmentDescriptor.doubleReturns the end relative offset the stock element described by thisMaterialFragmentDescriptor.getStock()Returns the total amount of materials described by thisMaterialFragmentDescriptor.
-
Constructor Details
-
MaterialFragmentDescriptor
Creates a newMaterialFragmentDescriptorinstance.- Parameters:
beginOffset- begin relative offset the stock elementendOffset- end relative offset the stock elementstock- anAccumulatorinstance with new contents- Throws:
NullPointerException- if thestockisnull
-
-
Method Details
-
getBeginOffset
public double getBeginOffset()Returns the begin relative offset the stock element described by thisMaterialFragmentDescriptor.- Returns:
- begin relative offset the stock element described by this
MaterialFragmentDescriptor
-
getEndOffset
public double getEndOffset()Returns the end relative offset the stock element described by thisMaterialFragmentDescriptor.- Returns:
- end relative offset the stock element described by this
MaterialFragmentDescriptor
-
getStock
Returns the total amount of materials described by thisMaterialFragmentDescriptor.- Returns:
- total amount of materials described by this
MaterialFragmentDescriptor
-