程序包 org.coodex.util
类 Section<T extends Comparable<T>>
java.lang.Object
org.coodex.util.Section<T>
- 类型参数:
T- 可比较的
某一个一维空间上的线段,可以进行合并,减法操作
-
嵌套类概要
嵌套类 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明protected TcloneObject(T t) getEnd()getStart()static <T extends Comparable<T>,S extends Section<T>>
List<S>intersect(List<S> s1, List<S> s2, Section.Builder<T, S> builder) 求交集static <T extends Comparable<T>,S extends Section<T>>
List<S>merge(List<S> sections, Section.Builder<T, S> builder) static <T extends Comparable<T>,S extends Section<T>>
List<S>sub(List<S> subtractedList, List<S> subtractionList, Section.Builder<T, S> builder) toString()
-
构造器详细资料
-
Section
-
-
方法详细资料
-
merge
public static <T extends Comparable<T>,S extends Section<T>> List<S> merge(List<S> sections, Section.Builder<T, S> builder) - 类型参数:
T- ComparableS- Section- 参数:
sections- 一组线段- 返回:
- 合并,并排序以后的线段
-
intersect
public static <T extends Comparable<T>,S extends Section<T>> List<S> intersect(List<S> s1, List<S> s2, Section.Builder<T, S> builder) 求交集- 类型参数:
T- ComparableS- Section- 参数:
s1- 组1s2- 组2builder- S的builder- 返回:
- 组1组2的交集
-
sub
public static <T extends Comparable<T>,S extends Section<T>> List<S> sub(List<S> subtractedList, List<S> subtractionList, Section.Builder<T, S> builder) - 类型参数:
T- ComparableS- Section- 参数:
subtractedList- 被减线段集合subtractionList- 减数线段集合builder- S的builder- 返回:
- 减除以后的线段集合
-
toString
-
cloneObject
-
getStart
-
getEnd
-