Class Material
java.lang.Object
com.assemblyrobot.simulator.system.components.Material
- All Implemented Interfaces:
java.lang.Comparable<Material>
public class Material extends java.lang.Object implements java.lang.Comparable<Material>
Represents a product traveling through the production line in a simulated environment.
-
Constructor Summary
Constructors Constructor Description Material() -
Method Summary
Modifier and Type Method Description intcompareTo(Material material)longgetTotalPassthroughTime()Calculates the amount of time theMaterialspent in the system.voidreset()Resets all class fields to their default values.static voidresetId()voidsetNextStage(@NonNull StageID nextStage)Alternatively worded setter forcurrentStage.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
Material
public Material()
-
-
Method Details
-
resetId
public static void resetId() -
reset
public void reset()Resets all class fields to their default values. Used when transferring betweenStages, since this object is not garbage collected until it has passed through the entire system. -
getTotalPassthroughTime
public long getTotalPassthroughTime()Calculates the amount of time theMaterialspent in the system.- Returns:
- The difference of
processingEndTimeandprocessingStartTime.
-
compareTo
- Specified by:
compareToin interfacejava.lang.Comparable<Material>
-