LimeWire Consolidated API

com.limegroup.gnutella.spam
Class AddressToken

java.lang.Object
  extended by com.limegroup.gnutella.spam.Token
      extended by com.limegroup.gnutella.spam.AddressToken
All Implemented Interfaces:
Serializable

public class AddressToken
extends Token

A token representing an IP address

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.limegroup.gnutella.spam.Token
rating
 
Constructor Summary
AddressToken(String address, com.google.inject.Provider<IPFilter> ipFilter)
           
 
Method Summary
 boolean equals(Object o)
           
protected  float getRating()
          Gets this token's spam rating
protected  float getWeight()
          Returns a weight between 0 and 1 that determines how sensitive this token's spam rating is to updates - 0 means an update has no effect on the rating, while 1 means an update completely changes the rating.
 int hashCode()
           
 String toString()
           
 
Methods inherited from class com.limegroup.gnutella.spam.Token
updateRating
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AddressToken

public AddressToken(String address,
                    com.google.inject.Provider<IPFilter> ipFilter)
Method Detail

getRating

protected float getRating()
Description copied from class: Token
Gets this token's spam rating

Overrides:
getRating in class Token
Returns:
a rating between 0 (not spam) and 1 (spam)

getWeight

protected float getWeight()
Description copied from class: Token
Returns a weight between 0 and 1 that determines how sensitive this token's spam rating is to updates - 0 means an update has no effect on the rating, while 1 means an update completely changes the rating.

Specified by:
getWeight in class Token
Returns:
a weight between 0 (not sensitive) and 1 (sensitive)

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object

LimeWire Consolidated API

Copyright © 2009. All Rights Reserved.