Package org.yamcs.parameter
Class SubscriptionArray
java.lang.Object
org.yamcs.parameter.SubscriptionArray
set of subscription ids - represented as sorted array
no duplicate allowed
copy on write
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(int subscriptionId) add subscription id to the array If it's already in the array, the operation has no effectint[]
getArray()
boolean
isEmpty()
boolean
remove
(int subscriptionId) Remove the subscriptionId from the array return true if it has been removed or false if it was not thereint
size()
toString()
-
Constructor Details
-
SubscriptionArray
public SubscriptionArray()
-
-
Method Details
-
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() -
toString
-