com.hankcs.hanlp.algoritm.ahocorasick.interval
类 Interval

java.lang.Object
  继承者 com.hankcs.hanlp.algoritm.ahocorasick.interval.Interval
所有已实现的接口:
Intervalable, Comparable
直接已知子类:
Emit

public class Interval
extends Object
implements Intervalable

区间


构造方法摘要
Interval(int start, int end)
          构造一个区间
 
方法摘要
 int compareTo(Object o)
           
 boolean equals(Object o)
           
 int getEnd()
          终点
 int getStart()
          起点
 int hashCode()
           
 boolean overlapsWith(int point)
          区间是否覆盖了这个点
 boolean overlapsWith(Interval other)
          是否与另一个区间交叉(有一部分重叠)
 int size()
          长度
 String toString()
           
 
从类 java.lang.Object 继承的方法
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

构造方法详细信息

Interval

public Interval(int start,
                int end)
构造一个区间

参数:
start -
end -
方法详细信息

getStart

public int getStart()
从接口 Intervalable 复制的描述
起点

指定者:
接口 Intervalable 中的 getStart
返回:

getEnd

public int getEnd()
从接口 Intervalable 复制的描述
终点

指定者:
接口 Intervalable 中的 getEnd
返回:

size

public int size()
从接口 Intervalable 复制的描述
长度

指定者:
接口 Intervalable 中的 size
返回:

overlapsWith

public boolean overlapsWith(Interval other)
是否与另一个区间交叉(有一部分重叠)

参数:
other -
返回:

overlapsWith

public boolean overlapsWith(int point)
区间是否覆盖了这个点

参数:
point -
返回:

equals

public boolean equals(Object o)
覆盖:
Object 中的 equals

hashCode

public int hashCode()
覆盖:
Object 中的 hashCode

compareTo

public int compareTo(Object o)
指定者:
接口 Comparable 中的 compareTo

toString

public String toString()
覆盖:
Object 中的 toString


Copyright © 2014–2015 码农场. All rights reserved.