org.apache.james.smtpserver.junkscore
Class JunkScoreImpl

java.lang.Object
  extended by org.apache.james.smtpserver.junkscore.JunkScoreImpl
All Implemented Interfaces:
JunkScore

public class JunkScoreImpl
extends java.lang.Object
implements JunkScore

The Object which holds all junkscore


Field Summary
 
Fields inherited from interface org.apache.james.smtpserver.junkscore.JunkScore
JUNK_SCORE, JUNK_SCORE_ATTR, JUNK_SCORE_COMPOSED_ATTR, JUNK_SCORE_SESSION, JUNK_SCORE_SESSION_ATTR
 
Constructor Summary
JunkScoreImpl()
           
 
Method Summary
 double getCompleteStoredScores()
          Return the summary of stored scores
 double getStoredScore(java.lang.String key)
          Return the score for the given key.
 java.util.Map getStoredScores()
          Return a copy of the Map which contains the keys with the correspending scores
 double resetStoredScores()
          Reset the all stored scores in the map.
 double setStoredScore(java.lang.String key, double score)
          Set the score for the given key.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JunkScoreImpl

public JunkScoreImpl()
Method Detail

getCompleteStoredScores

public double getCompleteStoredScores()
Description copied from interface: JunkScore
Return the summary of stored scores

Specified by:
getCompleteStoredScores in interface JunkScore
Returns:
score the summary of all stored scores
See Also:
JunkScore.getCompleteStoredScores()

getStoredScores

public java.util.Map getStoredScores()
Description copied from interface: JunkScore
Return a copy of the Map which contains the keys with the correspending scores

Specified by:
getStoredScores in interface JunkScore
Returns:
scoreMape the map which holds all keys and scores
See Also:
JunkScore.getStoredScores()

getStoredScore

public double getStoredScore(java.lang.String key)
Description copied from interface: JunkScore
Return the score for the given key. Returns 0 if no score with the given key exist

Specified by:
getStoredScore in interface JunkScore
Parameters:
key - the key to get the score for
Returns:
score the score
See Also:
JunkScore.getStoredScore(java.lang.String)

setStoredScore

public double setStoredScore(java.lang.String key,
                             double score)
Description copied from interface: JunkScore
Set the score for the given key. Return the previous stored score for the key.

Specified by:
setStoredScore in interface JunkScore
Parameters:
key - the key under which the score should be stored
score - the store to score
Returns:
oldScore the previous scored stored under the given key
See Also:
JunkScore.setStoredScore(java.lang.String, double)

resetStoredScores

public double resetStoredScores()
Description copied from interface: JunkScore
Reset the all stored scores in the map. Return the summary of the previous stored scores.

Specified by:
resetStoredScores in interface JunkScore
Returns:
oldScore the summary of the old score;
See Also:
JunkScore.resetStoredScores()


Copyright ? 2002-2009 The Apache Software Foundation. All Rights Reserved.