|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--PaP.CapabilitySet
Defines the representation of capability sets, and functionality related to capability sets. Capability sets are properties attached to actors, and they are used as requirements for doing plug in of actors. A capability set may consists of zero or more capabilities, where each capability value is represented as a text string. Capabilitities specifications may be done as a dotted (i.e. ".") separated list of terms, where each term represents a level in the hierarchical specification of the capability. I.e. "printer" define the capability "any printer", while "printer.postscript" specifies the capability "printer with postscript capabilities". The term asterisk (i.e. "*") may be used to specify "any value" for a capability term. I.e. "printer.*" specifies any printer capability. Functionality is defined to assign or change the set of capabilities included into a capability set value, and also functionality to determine whether or not a set of capabilities is included in another specified capability set
Field Summary | |
static int |
Add
Add specified capabilities to set for those not already existing |
private java.util.Vector |
capabilities
The set of capabilities included in this set is represented as a vector. |
static int |
Remove
Remove specified set of capabilities, for those that exists in set |
static int |
Set
Set capability set to value specified |
Constructor Summary | |
CapabilitySet(java.lang.String[] initialSet)
Constructor defines a capability set, with an initial value as specified. |
Method Summary | |
private void |
addEntries(java.lang.String[] entries)
Add a number of entries to the capability set |
private int |
capabilityIncluded(java.util.Vector set,
java.lang.String cap)
Check whether or not the specified capabilities is included within the specified set. |
java.lang.String[] |
getAll()
Determine all capability entries |
boolean |
includedIn(CapabilitySet caps)
Check if specified capability set is included in this one |
int |
length()
Determine the number of category entries included into the set |
(package private) static void |
main(java.lang.String[] args)
main is just included for the purpose of standalone testing No arguments are used |
private void |
removeEntries(java.lang.String[] entries)
Remove specified entries that are included into the set |
java.lang.String |
toString()
Determine a string representation of all capabilities. |
static java.lang.String |
toString(CapabilitySet obj)
Determine a string representation of all capabilities. |
void |
update(int opType,
CapabilitySet caps)
Update set of capabilities according to specified set and operation type |
java.lang.String |
value(int i)
Determine the value of a specified category entry in the set |
Methods inherited from class java.lang.Object |
|
Field Detail |
private java.util.Vector capabilities
public static final int Set
public static final int Add
public static final int Remove
Constructor Detail |
public CapabilitySet(java.lang.String[] initialSet)
initialSet
- The initial set of capabilitiesMethod Detail |
public void update(int opType, CapabilitySet caps)
opType
- Operation typecaps
- The set of capabilitiesprivate int capabilityIncluded(java.util.Vector set, java.lang.String cap)
set
- The set of capabilities to check againstcap
- The specified capability valueprivate void addEntries(java.lang.String[] entries)
entries
- The set of capability entries to addprivate void removeEntries(java.lang.String[] entries)
entries
- The set of entries to be removedpublic int length()
public java.lang.String value(int i)
i
- The index to where the category entry is locatedpublic java.lang.String[] getAll()
public boolean includedIn(CapabilitySet caps)
caps
- The set of capabilities that are checked if includedpublic java.lang.String toString()
toString
in class java.lang.Object
public static java.lang.String toString(CapabilitySet obj)
obj
- CapabilitySet object - if existingstatic void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |