Jive Forums API (5.5.20.2-oracle) Developer Javadocs

com.jivesoftware.forum.mail.token
Class EmailTokenSet

java.lang.Object
  extended by com.jivesoftware.forum.mail.token.EmailTokenSet
All Implemented Interfaces:
com.tangosol.io.ExternalizableLite, java.io.Serializable

public class EmailTokenSet
extends java.lang.Object
implements com.tangosol.io.ExternalizableLite

EmailTokenSets are used by the EmailTokenManager to hold the EmailTokens associated with a specific user. They are not the concern of other parts of the system, but are not implemented as a private inner class to facilitate serialization.

See Also:
Serialized Form

Constructor Summary
EmailTokenSet()
           
 
Method Summary
 void add(EmailToken token)
          Adds on EmailToken to the set.
 EmailToken getByDate(java.util.Date timestamp)
          Returns the first token in the set whose timestamp matches the day of year and year in the supplied Date
 int getCachedSize()
           
 int getSize()
           
 java.util.Iterator iterator()
          Returns an Iterator of all EmailTokens in the set, sorted by timestamp.
 void readExternal(java.io.DataInput dataInput)
           
 void remove(EmailToken token)
          Removes the supplied EmailToken from the set.
 void writeExternal(java.io.DataOutput dataOutput)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EmailTokenSet

public EmailTokenSet()
Method Detail

add

public void add(EmailToken token)
Adds on EmailToken to the set.

Parameters:
token - the token to add.

remove

public void remove(EmailToken token)
Removes the supplied EmailToken from the set.

Parameters:
token - the token to remove.

iterator

public java.util.Iterator iterator()
Returns an Iterator of all EmailTokens in the set, sorted by timestamp. (Newest to Oldest).

Returns:
an Iterator of all EmailTokens in the set, sorted by timestamp. (Newest to Oldest).

getByDate

public EmailToken getByDate(java.util.Date timestamp)
Returns the first token in the set whose timestamp matches the day of year and year in the supplied Date

Parameters:
timestamp - the Date to test for day of year and year.
Returns:
the first token in the set whose timestamp matches the day of year and year in the supplied Date

getSize

public int getSize()

getCachedSize

public int getCachedSize()

readExternal

public void readExternal(java.io.DataInput dataInput)
                  throws java.io.IOException
Specified by:
readExternal in interface com.tangosol.io.ExternalizableLite
Throws:
java.io.IOException

writeExternal

public void writeExternal(java.io.DataOutput dataOutput)
                   throws java.io.IOException
Specified by:
writeExternal in interface com.tangosol.io.ExternalizableLite
Throws:
java.io.IOException

Jive Forums Project Page

Copyright © 1999-2006 Jive Software.