Class MaterialFragmentDescriptor<T>

java.lang.Object
com.amalgamasimulation.discreterate.MaterialFragmentDescriptor<T>
Type Parameters:
T - type (class or interface) whose instances represent materials

public class MaterialFragmentDescriptor<T> extends Object
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 Details

    • MaterialFragmentDescriptor

      public MaterialFragmentDescriptor(double beginOffset, double endOffset, Accumulator<T> stock)
      Creates a new MaterialFragmentDescriptor instance.
      Parameters:
      beginOffset - begin relative offset the stock element
      endOffset - end relative offset the stock element
      stock - an Accumulator instance with new contents
      Throws:
      NullPointerException - if the stock is null
  • Method Details

    • getBeginOffset

      public double getBeginOffset()
      Returns the begin relative offset the stock element described by this MaterialFragmentDescriptor.
      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 this MaterialFragmentDescriptor.
      Returns:
      end relative offset the stock element described by this MaterialFragmentDescriptor
    • getStock

      public Accumulator<T> getStock()
      Returns the total amount of materials described by this MaterialFragmentDescriptor.
      Returns:
      total amount of materials described by this MaterialFragmentDescriptor