Class FM2SimRunControlMessage.Builder
- java.lang.Object
-
- org.sim0mq.message.Sim0MQMessage.Builder<FM2SimRunControlMessage.Builder>
-
- org.sim0mq.message.federationmanager.FM2SimRunControlMessage.Builder
-
- Enclosing class:
- FM2SimRunControlMessage
public static class FM2SimRunControlMessage.Builder extends Sim0MQMessage.Builder<FM2SimRunControlMessage.Builder>
Builder for the SimRunControl Message. Can string setters together, and call build() at the end to build the actual message.Copyright (c) 2016-2020 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See Sim0MQ License.- Author:
- Alexander Verbraeck
-
-
Field Summary
-
Fields inherited from class org.sim0mq.message.Sim0MQMessage.Builder
federationId, messageId, messageTypeId, receiverId, senderId
-
-
Constructor Summary
Constructors Constructor Description Builder()
Empty constructor.
-
Method Summary
-
Methods inherited from class org.sim0mq.message.Sim0MQMessage.Builder
setMessageId, setMessageTypeId, setReceiverId, setSenderId, setSimulationRunId
-
-
-
-
Method Detail
-
setRunDurationNumber
public final FM2SimRunControlMessage.Builder setRunDurationNumber(Number newRunDuration)
- Parameters:
newRunDuration
- set runDuration- Returns:
- the original object for chaining
-
setRunDuration
public final FM2SimRunControlMessage.Builder setRunDuration(Duration newRunDuration)
- Parameters:
newRunDuration
- set runDuration- Returns:
- the original object for chaining
-
setRunDurationFloat
public final FM2SimRunControlMessage.Builder setRunDurationFloat(FloatDuration newRunDuration)
- Parameters:
newRunDuration
- set runDuration- Returns:
- the original object for chaining
-
setWarmupDurationNumber
public final FM2SimRunControlMessage.Builder setWarmupDurationNumber(Number newWarmupDuration)
- Parameters:
newWarmupDuration
- set warmupDuration- Returns:
- the original object for chaining
-
setWarmupDuration
public final FM2SimRunControlMessage.Builder setWarmupDuration(Duration newWarmupDuration)
- Parameters:
newWarmupDuration
- set warmupDuration- Returns:
- the original object for chaining
-
setWarmupDurationFloat
public final FM2SimRunControlMessage.Builder setWarmupDurationFloat(FloatDuration newWarmupDuration)
- Parameters:
newWarmupDuration
- set warmupDuration- Returns:
- the original object for chaining
-
setOffsetTimeNumber
public final FM2SimRunControlMessage.Builder setOffsetTimeNumber(Number newOffsetTime)
- Parameters:
newOffsetTime
- set offsetTime- Returns:
- the original object for chaining
-
setOffsetTime
public final FM2SimRunControlMessage.Builder setOffsetTime(Time newOffsetTime)
- Parameters:
newOffsetTime
- set offsetTime- Returns:
- the original object for chaining
-
setOffsetTimeFloat
public final FM2SimRunControlMessage.Builder setOffsetTimeFloat(FloatTime newOffsetTime)
- Parameters:
newOffsetTime
- set offsetTime- Returns:
- the original object for chaining
-
setSpeed
public final FM2SimRunControlMessage.Builder setSpeed(double newSpeed)
- Parameters:
newSpeed
- set speed- Returns:
- the original object for chaining
-
setNumberReplications
public final FM2SimRunControlMessage.Builder setNumberReplications(int newNumberReplications)
- Parameters:
newNumberReplications
- set numberReplications- Returns:
- the original object for chaining
-
setStreamMap
public final FM2SimRunControlMessage.Builder setStreamMap(Map<Object,Long> newStreamMap)
- Parameters:
newStreamMap
- set streamMap- Returns:
- the original object for chaining
-
build
public FM2SimRunControlMessage build() throws Sim0MQException, NullPointerException
Build the object.- Specified by:
build
in classSim0MQMessage.Builder<FM2SimRunControlMessage.Builder>
- Returns:
- the message object from the builder.
- Throws:
Sim0MQException
- on unknown data typeNullPointerException
- when one of the parameters is null
-
-