|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.groboclown.util.jplugin.v2.ClassAttributes
Maintains a list attributes and a collection of values that each attribute may contain. The attribute names are not case sensitive, and the values are optionally case sensitive.
Inner Class Summary | |
private static class |
ClassAttributes.NoCaseStr
A Non-case sensitive string |
private static class |
ClassAttributes.ValueSet
A collection of values |
Field Summary | |
private Vector |
names
|
private Hashtable |
nameStrToValStr
|
Constructor Summary | |
ClassAttributes()
Default Constructor |
Method Summary | |
void |
addAttributes(ClassAttributes ca)
Adds one set of attributes to the current list of attributes. |
boolean |
contains(String name)
Checks if the attribute with the given name has an associated value. |
String |
get(String name)
Returns the appended value string for the attribute of the given name. |
String[] |
getNames()
Get all the names in the list. |
String[] |
getValues(String name)
Returns the appended value string for the attribute of the given name. |
boolean |
hasAttribute(String attrib)
Check if this class has a matching attribute name defined. |
boolean |
hasAttribute(String attrib,
String val)
Check if this class has a matching attribute with a matching value, ignoring the case of the value. |
boolean |
hasAttribute(String attrib,
String val,
boolean isCaseSensitive)
Check if this class has a matching attribute with a matching value. |
void |
put(String name,
String value)
Adds the value to the attribute with the given name. |
String |
toString()
Converts the attribute listing into a MANIFEST.MF compatible listing. |
Methods inherited from class java.lang.Object |
|
Field Detail |
private Hashtable nameStrToValStr
private Vector names
Constructor Detail |
public ClassAttributes()
Method Detail |
public String[] getNames()
public void addAttributes(ClassAttributes ca)
public boolean contains(String name)
public void put(String name, String value)
public String get(String name)
public String[] getValues(String name)
public boolean hasAttribute(String attrib)
public boolean hasAttribute(String attrib, String val)
val
- the value which the attribute must contain, or
null if you want to check if the attribute
is not defined.public boolean hasAttribute(String attrib, String val, boolean isCaseSensitive)
val
- the value which the attribute must contain, or
null if you want to check if the attribute
is not defined.isCaseSensitive
- true if the values must match
their cases exactly.public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |