T - 可比较的public class Section<T extends Comparable<T>> extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
Section.Builder<T extends Comparable<T>,S extends Section<T>> |
| Modifier | Constructor and Description |
|---|---|
protected |
Section(T start,
T end) |
| Modifier and Type | Method and Description |
|---|---|
protected T |
cloneObject(T t) |
T |
getEnd() |
T |
getStart() |
static <T extends Comparable<T>,S extends Section<T>> |
intersect(List<S> s1,
List<S> s2,
Section.Builder<T,S> builder)
求交集
|
static <T extends Comparable<T>,S extends Section<T>> |
merge(List<S> sections,
Section.Builder<T,S> builder) |
static <T extends Comparable<T>,S extends Section<T>> |
sub(List<S> subtractedList,
List<S> subtractionList,
Section.Builder<T,S> builder) |
String |
toString() |
public static <T extends Comparable<T>,S extends Section<T>> List<S> merge(List<S> sections, Section.Builder<T,S> builder)
T - ComparableS - Sectionsections - 一组线段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 - Sections1 - 组1s2 - 组2builder - S的builderpublic 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 - SectionsubtractedList - 被减线段集合subtractionList - 减数线段集合builder - S的builderpublic T getStart()
public T getEnd()
Copyright © 2020. All rights reserved.