Class StreamInformation

java.lang.Object
nl.tudelft.simulation.dsol.experiment.StreamInformation
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
StreamSeedInformation

public class StreamInformation extends Object implements Serializable
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 Details

    • StreamInformation

      public StreamInformation()
      Construct a StreamInformation object that can be used to pass information about streams to to a model.
    • StreamInformation

      public StreamInformation(StreamInterface defaultStream)
      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

      public void addStream(String streamId, StreamInterface stream)
      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 added
      stream - StreamInterface; the stream
      Throws:
      NullPointerException - when streamId is null or stream is null
    • getStreams

      public Map<String,StreamInterface> getStreams()
      Return the streams of this model, mapping stream ids to streams.
      Returns:
      Map<String, StreamInterface>; the stored streams
    • getStream

      public StreamInterface getStream(String streamId)
      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