Package 

Class SubscriptionList

    • Method Summary

      Modifier and Type Method Description
      boolean isUnsubscribed() Indicates whether this {@code Subscription} is currently unsubscribed.
      void add(Subscription s) Adds a new Subscription to this {@code SubscriptionList} if the {@code SubscriptionList} isnot yet unsubscribed.
      void remove(Subscription s)
      void unsubscribe() Unsubscribe from all of the subscriptions in the list, which stops the receipt of notifications onthe associated {@code Subscriber}.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SubscriptionList

        SubscriptionList()
        Constructs an empty SubscriptionList.
      • SubscriptionList

        SubscriptionList(Array<Subscription> subscriptions)
        Constructs a SubscriptionList with the given initial child subscriptions.
        Parameters:
        subscriptions - the array of subscriptions to start with
      • SubscriptionList

        SubscriptionList(Subscription s)
        Constructs a SubscriptionList with the given initial child subscription.
        Parameters:
        s - the initial subscription instance
    • Method Detail

      • isUnsubscribed

         boolean isUnsubscribed()

        Indicates whether this {@code Subscription} is currently unsubscribed.

      • add

         void add(Subscription s)

        Adds a new Subscription to this {@code SubscriptionList} if the {@code SubscriptionList} isnot yet unsubscribed. If the {@code SubscriptionList}is unsubscribed, {@code add} willindicate this by explicitly unsubscribing the new {@code Subscription} as well.

        Parameters:
        s - the Subscription to add
      • unsubscribe

         void unsubscribe()

        Unsubscribe from all of the subscriptions in the list, which stops the receipt of notifications onthe associated {@code Subscriber}.