com.bloomberglp.blpapi
Class SubscriptionList

java.lang.Object
  extended by com.bloomberglp.blpapi.SubscriptionList
All Implemented Interfaces:
java.lang.Iterable<Subscription>

public final class SubscriptionList
extends java.lang.Object
implements java.lang.Iterable<Subscription>

Contains a list of subscriptions.

This component provides a structure to hold the data used (and returned) by the Session.subscribe(com.bloomberglp.blpapi.SubscriptionList), Session.resubscribe(com.bloomberglp.blpapi.SubscriptionList), and Session.unsubscribe(com.bloomberglp.blpapi.SubscriptionList) methods. See "STRUCTURE OF SUBSCRIPTION STRING" section in Subscription for more information on subscription strings.*

QUALIFYING SUBSCRIPTION STRINGS

The subscription strings passed to Subscription are automatically qualified if the service identifier is missing (i.e. if the subscription string does not start with "//"). The subscription parameters (i.e. the optional part after instrument identifier) are never modified.


Constructor Summary
SubscriptionList()
          Constructs an empty SubscriptionList
SubscriptionList(int initialCapacity)
          Constructs an empty SubscriptionList with the specified initialCapacity
 
Method Summary
 boolean add(Subscription subscription)
          Appends the specified subscription to the end of this list
 void clear()
          Remove all Subscriptions from this SubscriptionList.
 Subscription get(int index)
          Get the Subscription at the specified index in this SubscriptionList
 boolean isEmpty()
          Tests if this SubscriptionList has no elements
 java.util.Iterator<Subscription> iterator()
          Return an iterator over the subscriptions contained in this SubscriptionList
 Subscription remove(int index)
          Remove the Subscription at the specified index in this SubscriptionList
 int size()
          Returns the number of Subscriptions in this SubscriptionList
 Subscription[] toArray()
          Returns an array containing all of the Subscriptions in this SubscriptionList in the correct order
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SubscriptionList

public SubscriptionList()
Constructs an empty SubscriptionList


SubscriptionList

public SubscriptionList(int initialCapacity)
Constructs an empty SubscriptionList with the specified initialCapacity

Method Detail

add

public boolean add(Subscription subscription)
Appends the specified subscription to the end of this list

Parameters:
subscription - the Subscription that is to be added to this list

clear

public void clear()
Remove all Subscriptions from this SubscriptionList.


get

public Subscription get(int index)
Get the Subscription at the specified index in this SubscriptionList

Parameters:
index - the index of the Subscription to return
Returns:
the subscription at the specified index in this SubscriptionList
Throws:
java.lang.IndexOutOfBoundsException - if index >= size()

isEmpty

public boolean isEmpty()
Tests if this SubscriptionList has no elements

Returns:
true if this SubscriptionList has no elements false otherwise

remove

public Subscription remove(int index)
Remove the Subscription at the specified index in this SubscriptionList

Parameters:
index - the index of the Subscription to remove from this SubscriptionList
Returns:
the Subscription that was removed from this SubscriptionList
Throws:
java.lang.IndexOutOfBoundsException - if index >= size()

size

public int size()
Returns the number of Subscriptions in this SubscriptionList


toArray

public Subscription[] toArray()
Returns an array containing all of the Subscriptions in this SubscriptionList in the correct order


iterator

public java.util.Iterator<Subscription> iterator()
Return an iterator over the subscriptions contained in this SubscriptionList

Specified by:
iterator in interface java.lang.Iterable<Subscription>


Copyright © 2015 Bloomberg L.P.. All Rights Reserved.