com.xiaoleilu.hutool.bloomFilter.filter
接口 Filter

所有已知实现类:
AbstractFilter, DefaultFilter, ELFFilter, FNVFilter, HfFilter, HfIpFilter, JSFilter, PJWFilter, RSFilter, SDBMFilter, TianlFilter

public interface Filter


方法摘要
 void add(String str)
          在boolean的bitMap中增加一个字符串
 boolean contains(String str)
           
 boolean containsAndAdd(String str)
           
 long hash(String str)
          自定义Hash方法
 

方法详细信息

contains

boolean contains(String str)
参数:
str - 字符串
返回:
判断一个字符串是否bitMap中存在

add

void add(String str)
在boolean的bitMap中增加一个字符串

参数:
str - 字符串

containsAndAdd

boolean containsAndAdd(String str)
参数:
str - 字符串
返回:
如果存在就返回true .如果不存在.先增加这个字符串.再返回false

hash

long hash(String str)
自定义Hash方法

参数:
str - 字符串
返回:
HashCode


Copyright © 2014. All rights reserved.