|
intarsys runtime library | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.intarsys.tools.tag.TagTools
public class TagTools
A tool class for implementing a generic String based tagging feature.
| Constructor Summary | |
|---|---|
TagTools()
|
|
| Method Summary | |
|---|---|
static void |
addTag(Object object,
String key,
String value)
Add a tag to an object. |
static void |
addTag(Object object,
Tag tag)
Add a tag to an object. |
static void |
addTags(Object object,
List<Tag> pTags)
|
static void |
addTags(Object object,
Map<String,String> pTags)
|
static void |
addTags(Object object,
String tagString)
Add a tag string to object. |
static void |
addTags(Object object,
Tag[] pTags)
|
static Tag |
getTag(Object object,
String key)
Get the first tag matching "key". |
static Tag[] |
getTags(Object object)
Get all tags for object. |
static Tag[] |
getTags(Object object,
String key)
Get all tags matching "key". |
static String |
getTagValue(Object object,
String key)
Get the value of the first tag matching "key". |
static String[] |
getTagValues(Object object)
Get all tags values for object. |
static String[] |
getTagValues(Object object,
String key)
Get all tag values for tags matching "key". |
static boolean |
hasTag(Object object,
String key)
true if object is tagged with "key" |
static boolean |
hasTags(Object object)
true if object has tags |
static void |
removeTags(Object object,
String key)
Remove all tags for key. |
static void |
setTag(Object object,
String key,
String value)
Replace the previous association of tags for key in object with value. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TagTools()
| Method Detail |
|---|
public static void addTag(Object object,
String key,
String value)
object - The object to be taggedkey - The tag keyvalue - The tag value
public static void addTag(Object object,
Tag tag)
object - The object to be taggedtag - The new tag
public static void addTags(Object object,
List<Tag> pTags)
public static void addTags(Object object,
Map<String,String> pTags)
public static void addTags(Object object,
String tagString)
object - The object to be taggedtagString - A tag string of the form "key1=value1;key2=value2..."
public static void addTags(Object object,
Tag[] pTags)
public static Tag getTag(Object object,
String key)
object - The tagged objectkey - The key value that is searched
nullpublic static Tag[] getTags(Object object)
object - The tagged object
public static Tag[] getTags(Object object,
String key)
object - The tagged objectkey - The key value that is searched
public static String getTagValue(Object object,
String key)
object - The tagged objectkey - The key value that is searched
nullpublic static String[] getTagValues(Object object)
object - The tagged object
public static String[] getTagValues(Object object,
String key)
object - The tagged objectkey - The key value that is searched
public static boolean hasTag(Object object,
String key)
true if object is tagged with "key"
object - The tagged objectkey - The key value that is searched
true if object is tagged with "key"public static boolean hasTags(Object object)
true if object has tags
object - The tagged object
true if object has tags
public static void removeTags(Object object,
String key)
object - The tagged objectkey - The key value for the tags to be removed
public static void setTag(Object object,
String key,
String value)
object - The tagged object.key - The key for the tag to be replacedvalue - The new value
|
intarsys runtime library | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||