Class NamedChannels

Object
NamedChannels
All Implemented Interfaces:
Iterable<Map.Entry<String,Channel>>

public class NamedChannels extends Object implements Iterable<Map.Entry<String,Channel>>
A collection of Channels each with an associated unique-name.
Author:
Owen Feehan
  • Constructor Details

    • NamedChannels

      public NamedChannels(boolean rgb)
      Creates a new NamedChannels instance.
      Parameters:
      rgb - whether the channels originate from an RGB Stack or not.
    • NamedChannels

      public NamedChannels(Stream<NamedChannels> channelsToCombine) throws OperationFailedException
      Creates by combining multiple existing NamedChannels.
      Parameters:
      channelsToCombine - the NamedChannels to combine.
      Throws:
      OperationFailedException - if the RGB-state is inconsistent across Stacks.
  • Method Details

    • iterator

      public Iterator<Map.Entry<String,Channel>> iterator()
      Specified by:
      iterator in interface Iterable<Map.Entry<String,Channel>>
    • add

      public void add(String name, Channel channel) throws OperationFailedException
      Adds a Channel with a name.
      Parameters:
      name - a unique name for the channel.
      channel - the channel to add.
      Throws:
      OperationFailedException - if a channel with the same name has already been previously added.
    • names

      public Set<String> names()
      The names of the Channels.
      Returns:
      the channel names.
    • isRgb

      public boolean isRgb()
      Whether the channels originate from a Stack that is RGB, or not.