Package net.fortuna.mstor.model
Class Tags
- java.lang.Object
-
- net.fortuna.mstor.model.Tags
-
- All Implemented Interfaces:
Serializable,Iterable<String>,Collection<String>,Set<String>
public class Tags extends Object implements Set<String>, Serializable
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected static StringTAG_PREFIX
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanadd(String tag)booleanaddAll(Collection<? extends String> arg0)static voidaddTag(String tag, javax.mail.Message message)Adds the specified model to a message.voidclear()booleancontains(Object tag)booleancontainsAll(Collection<?> arg0)static TagsgetTags(javax.mail.Message message)Returns the tags associated with the specified message.booleanisEmpty()Iterator<String>iterator()booleanremove(Object tag)booleanremoveAll(Collection<?> arg0)static voidremoveTag(String tag, javax.mail.Message message)Remove the specified model from a message.booleanretainAll(Collection<?> arg0)intsize()Object[]toArray()<T> T[]toArray(T[] a)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Methods inherited from interface java.util.Set
equals, hashCode, spliterator
-
-
-
-
Field Detail
-
TAG_PREFIX
protected static final String TAG_PREFIX
- See Also:
- Constant Field Values
-
-
Method Detail
-
size
public final int size()
-
isEmpty
public final boolean isEmpty()
-
contains
public final boolean contains(Object tag)
-
toArray
public final Object[] toArray()
-
toArray
public final <T> T[] toArray(T[] a)
-
add
public final boolean add(String tag)
-
remove
public final boolean remove(Object tag)
-
containsAll
public final boolean containsAll(Collection<?> arg0)
- Specified by:
containsAllin interfaceCollection<String>- Specified by:
containsAllin interfaceSet<String>
-
addAll
public final boolean addAll(Collection<? extends String> arg0)
-
retainAll
public final boolean retainAll(Collection<?> arg0)
-
removeAll
public final boolean removeAll(Collection<?> arg0)
-
clear
public final void clear()
-
addTag
public static void addTag(String tag, javax.mail.Message message) throws javax.mail.MessagingException
Adds the specified model to a message.- Parameters:
tag-message-- Throws:
javax.mail.MessagingException- when unable to model the given messageUnsupportedOperationException- if the given message does not support tags
-
removeTag
public static void removeTag(String tag, javax.mail.Message message) throws javax.mail.MessagingException
Remove the specified model from a message.- Parameters:
tag-message-- Throws:
javax.mail.MessagingException- when unable to remove the model from the given messageUnsupportedOperationException- if the given message does not support tags
-
getTags
public static Tags getTags(javax.mail.Message message) throws javax.mail.MessagingException
Returns the tags associated with the specified message.- Parameters:
message-- Returns:
- Throws:
javax.mail.MessagingException- when unable to retrieve the tags for the given messageUnsupportedOperationException- if the given message does not support tags
-
-