public class TagTools extends Object
| Constructor and Description |
|---|
TagTools() |
| Modifier and Type | Method and Description |
|---|---|
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 void |
configureTags(Object target,
IElement pElement)
Configure tags for target.
|
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,
String defaultValue)
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 Tag |
parseTag(String definition) |
static List<Tag> |
parseTags(String definition) |
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.
|
public static void addTag(Object object, String key, String value)
object - The object to be taggedkey - The tag keyvalue - The tag valuepublic static void addTag(Object object, Tag tag)
object - The object to be taggedtag - The new tagpublic 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 configureTags(Object target, IElement pElement)
target - pElement - public static Tag getTag(Object object, String key)
object - The tagged objectkey - The key value that is searchednullpublic static Tag[] getTags(Object object)
object - The tagged objectpublic static Tag[] getTags(Object object, String key)
object - The tagged objectkey - The key value that is searchedpublic static String getTagValue(Object object, String key, String defaultValue)
object - The tagged objectkey - The key value that is searcheddefaultValue - TODOnullpublic static String[] getTagValues(Object object)
object - The tagged objectpublic static String[] getTagValues(Object object, String key)
object - The tagged objectkey - The key value that is searchedpublic static boolean hasTag(Object object, String key)
true if object is tagged with "key"object - The tagged objectkey - The key value that is searchedtrue if object is tagged with "key"public static boolean hasTags(Object object)
true if object has tagsobject - The tagged objecttrue if object has tagspublic static void removeTags(Object object, String key)
object - The tagged objectkey - The key value for the tags to be removedCopyright © 2013 intarsys consulting GmbH. All Rights Reserved.