Class StreamInformation
java.lang.Object
nl.tudelft.simulation.dsol.experiment.StreamInformation
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
StreamSeedInformation
StreamInformation contains information about Random Streams that exists before the model has been constructed.
Copyright (c) 2021-2024 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See for project information DSOL Manual. The DSOL project is distributed under a three-clause BSD-style license, which can be found at DSOL License.
- Author:
- Alexander Verbraeck
- See Also:
-
Constructor Summary
ConstructorDescriptionConstruct a StreamInformation object that can be used to pass information about streams to to a model.StreamInformation
(StreamInterface defaultStream) Construct a StreamInformation object that can be used to pass information about streams to to a model. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addStream
(String streamId, StreamInterface stream) Add a new stream, based on a stream id, possibly overwriting a previous existing stream with the same name.Return a specific stream, based on a stream id, or null when no stream with that id is present.Return the streams of this model, mapping stream ids to streams.
-
Constructor Details
-
StreamInformation
public StreamInformation()Construct a StreamInformation object that can be used to pass information about streams to to a model. -
StreamInformation
Construct a StreamInformation object that can be used to pass information about streams to to a model.- Parameters:
defaultStream
- StreamInterface; the default stream that can be retrieved with the name "default"- Throws:
NullPointerException
- when defaultStream is null
-
-
Method Details
-
addStream
Add a new stream, based on a stream id, possibly overwriting a previous existing stream with the same name. No warning will be given if previous information is overwritten.- Parameters:
streamId
- String; the id of the stream to be addedstream
- StreamInterface; the stream- Throws:
NullPointerException
- when streamId is null or stream is null
-
getStreams
Return the streams of this model, mapping stream ids to streams.- Returns:
- Map<String, StreamInterface>; the stored streams
-
getStream
Return a specific stream, based on a stream id, or null when no stream with that id is present.- Parameters:
streamId
- String; the id of the stream to be retrieved- Returns:
- StreamInterface; the stream, or null when no stream with that id is present
- Throws:
NullPointerException
- when streamId is null
-