com.moneydance.apps.md.model
Class TagSet

java.lang.Object
  extended by com.moneydance.apps.md.model.TagSet

public final class TagSet
extends java.lang.Object

This is a class used to keep track of an arbitrary set of tags that can be associated with transactions, currencies, or accounts.

Author:
Sean D. Reilly

Constructor Summary
TagSet()
           
TagSet(Tag[] tags)
           
 
Method Summary
 void clear()
          Remove all tags from this tagset.
 TagSet duplicate()
           
 boolean getBooleanTag(java.lang.String key, boolean defaultVal)
           
 double getDoubleTag(java.lang.String key, double defaultVal)
           
 int getIntTag(java.lang.String key, int defaultVal)
           
 long getLongTag(java.lang.String key, long defaultVal)
           
 java.lang.String getTag(java.lang.String key)
          Get the value associated with the given key (if any) in this transaction's set of tags.
 Tag getTagAt(int i)
          Get the tag at the specified location.
 int getTagCount()
          Get the number of tags for this transaction.
 void removeTag(java.lang.String key)
           
 void setTag(java.lang.String key, boolean value)
           
 void setTag(java.lang.String key, java.lang.String value)
          Set the value associated with the specified key in this transactions set of tags.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TagSet

public TagSet(Tag[] tags)

TagSet

public TagSet()
Method Detail

clear

public void clear()
Remove all tags from this tagset. Note: This is only available as of build 409.


removeTag

public void removeTag(java.lang.String key)

getIntTag

public int getIntTag(java.lang.String key,
                     int defaultVal)

getDoubleTag

public double getDoubleTag(java.lang.String key,
                           double defaultVal)

getBooleanTag

public boolean getBooleanTag(java.lang.String key,
                             boolean defaultVal)

getLongTag

public long getLongTag(java.lang.String key,
                       long defaultVal)

getTag

public java.lang.String getTag(java.lang.String key)
Get the value associated with the given key (if any) in this transaction's set of tags.


getTagCount

public int getTagCount()
Get the number of tags for this transaction.


getTagAt

public Tag getTagAt(int i)
Get the tag at the specified location.


setTag

public void setTag(java.lang.String key,
                   java.lang.String value)
Set the value associated with the specified key in this transactions set of tags. If there is already a value associated with the given key, it will be replaced.


setTag

public void setTag(java.lang.String key,
                   boolean value)

duplicate

public TagSet duplicate()