Package org.yamcs.parameter
Class SubscriptionArray
- java.lang.Object
-
- org.yamcs.parameter.SubscriptionArray
-
public class SubscriptionArray extends Object
set of subscription ids - represented as sorted array no duplicate allowed copy on write
-
-
Constructor Summary
Constructors Constructor Description SubscriptionArray()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
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()
String
toString()
-
-
-
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()
-
-