Class SubscriptionArray


  • public class SubscriptionArray
    extends Object
    set of subscription ids - represented as sorted array no duplicate allowed copy on write
    • Constructor Detail

      • SubscriptionArray

        public SubscriptionArray()
    • Method Detail

      • add

        public void add​(int subscriptionId)
        add subscription id to the array If it's already in the array, the operation has no effect
        Parameters:
        subscriptionId -
      • remove

        public boolean remove​(int subscriptionId)
        Remove the subscriptionId from the array return true if it has been removed or false if it was not there
        Parameters:
        subscriptionId -
        Returns:
      • isEmpty

        public boolean isEmpty()
      • getArray

        public int[] getArray()
      • size

        public int size()