| Modifier and Type | Class and Description |
|---|---|
class |
Fragments.Event |
static interface |
Fragments.Listener |
| Modifier and Type | Field and Description |
|---|---|
protected xyz.cofe.collection.Func2<Fragment,Long,Long> |
defCreateFragment |
protected xyz.cofe.collection.Func2<List<Fragment>,Fragment,Fragment> |
defIntersecResolver |
protected static Comparator<Fragment> |
defSorter |
protected Queue<Fragments.Event> |
eventQu |
protected xyz.cofe.common.ListenersHelper<Fragments.Listener,Fragments.Event> |
listeners |
protected Lock |
listenersLock |
protected Lock |
lock |
protected static Comparator<Fragment> |
sorterByBegin |
protected static Comparator<Fragment> |
sorterByInstanceID |
protected static Comparator<Fragment> |
sorterBySize |
protected AtomicBoolean |
syncFireListeners |
xyz.cofe.collection.Func2<List<Fragment>,Fragment,Fragment> |
unionIntersecResolver
Решение пересечения обьеднением
|
| Constructor and Description |
|---|
Fragments() |
Fragments(Fragments source,
Lock lock,
Lock listenersLock) |
Fragments(Iterable<Fragment> source) |
Fragments(Iterable<Fragment> source,
Lock lock,
Lock listenersLock) |
Fragments(Lock lock,
Lock listenersLock) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(Fragment e) |
void |
add(int index,
Fragment element) |
boolean |
addAll(Collection<? extends Fragment> c) |
boolean |
addAll(int index,
Collection<? extends Fragment> c) |
Closeable |
addListener(Fragments.Listener listener) |
Closeable |
addListener(Fragments.Listener listener,
boolean weakLink) |
void |
clear() |
Fragments |
clone() |
boolean |
contains(Object o) |
boolean |
containsAll(Collection<?> c) |
protected Fragment |
createFagment(long begin,
long end) |
List<Fragment> |
find(xyz.cofe.collection.Predicate<Fragment> p)
Поиск фрагментов по критерию
|
List<Fragment> |
findHoles(long begin,
long end)
Поиск дыр в указанном диапазоне
|
List<Fragment> |
findHoles(long fbegin,
long fend,
xyz.cofe.collection.Func2<Fragment,Long,Long> fcreateFragment)
Поиск дыр в указанном диапазоне
|
Map<Fragment,Set<Fragment>> |
findIntersections()
Поиск пересечений
|
List<Fragment> |
findZeroSize()
Поиск фрагментов нулей длинны
|
void |
fireEvent(Fragments.Event event) |
protected void |
fireEventQu() |
Fragment |
get(int index) |
Set<Fragments.Listener> |
getListeners() |
Lock |
getLock() |
int |
indexOf(Object o) |
boolean |
isEmpty() |
protected boolean |
isEquals(Fragment f1,
Fragment f2) |
Iterator<Fragment> |
iterator() |
int |
lastIndexOf(Object o) |
protected xyz.cofe.common.ListenersHelper<Fragments.Listener,Fragments.Event> |
listeners() |
ListIterator<Fragment> |
listIterator() |
ListIterator<Fragment> |
listIterator(int index) |
static xyz.cofe.collection.Predicate<Fragment> |
rangePredicate(long begin,
long end) |
Fragment |
remove(int index) |
boolean |
remove(Object o) |
boolean |
removeAll(Collection<?> c) |
void |
removeIntersections()
Удаление пересечений, так же удаляет нулевые фрагменты
|
void |
removeIntersections(xyz.cofe.collection.Func2<List<Fragment>,Fragment,Fragment> fintersecResolver)
Удаление пересечений, так же удаляет нулевые фрагменты
|
void |
removeListener(Fragments.Listener listener) |
void |
removeSameRange(Fragment fragment) |
boolean |
retainAll(Collection<?> c) |
Fragment |
set(int index,
Fragment element) |
int |
size() |
static xyz.cofe.collection.Predicate<Fragment> |
sizeEqualsPredicate(long size) |
void |
sort()
Сортировка
|
List<Fragment> |
subList(int fromIndex,
int toIndexExclusive) |
protected <T> T |
syncRun(xyz.cofe.collection.Func0<T> code)
Обновление свойств с учетом блокировок и много поточности.
|
Object[] |
toArray() |
<T> T[] |
toArray(T[] a) |
String |
toString() |
void |
visitEachEachWithoutPosition(xyz.cofe.collection.Func2<Object,Fragment,Fragment> visitor,
xyz.cofe.collection.Func2<Boolean,Fragment,Fragment> equals)
Обход каждый с каждым,
без учета позиции в сочетании пар и самого себя.
|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitequals, hashCode, replaceAll, sort, spliteratorparallelStream, removeIf, streamprotected final Lock lock
protected final Lock listenersLock
protected xyz.cofe.common.ListenersHelper<Fragments.Listener,Fragments.Event> listeners
protected Queue<Fragments.Event> eventQu
protected final AtomicBoolean syncFireListeners
protected static final Comparator<Fragment> sorterByBegin
protected static final Comparator<Fragment> sorterBySize
protected static final Comparator<Fragment> sorterByInstanceID
protected static final Comparator<Fragment> defSorter
public final xyz.cofe.collection.Func2<List<Fragment>,Fragment,Fragment> unionIntersecResolver
public Lock getLock()
protected xyz.cofe.common.ListenersHelper<Fragments.Listener,Fragments.Event> listeners()
public Set<Fragments.Listener> getListeners()
public Closeable addListener(Fragments.Listener listener)
public Closeable addListener(Fragments.Listener listener, boolean weakLink)
public void removeListener(Fragments.Listener listener)
public void fireEvent(Fragments.Event event)
protected void fireEventQu()
protected <T> T syncRun(xyz.cofe.collection.Func0<T> code)
T - Тип результатаcode - Код обновления свойствpublic ListIterator<Fragment> listIterator()
listIterator in interface List<Fragment>public ListIterator<Fragment> listIterator(int index)
listIterator in interface List<Fragment>public boolean add(Fragment e)
public boolean remove(Object o)
public boolean addAll(Collection<? extends Fragment> c)
public boolean addAll(int index,
Collection<? extends Fragment> c)
public void clear()
public boolean removeAll(Collection<?> c)
public boolean retainAll(Collection<?> c)
public boolean contains(Object o)
public boolean containsAll(Collection<?> c)
containsAll in interface Collection<Fragment>containsAll in interface List<Fragment>public boolean isEmpty()
public int lastIndexOf(Object o)
lastIndexOf in interface List<Fragment>public int size()
public Object[] toArray()
public <T> T[] toArray(T[] a)
public void removeSameRange(Fragment fragment)
public static xyz.cofe.collection.Predicate<Fragment> sizeEqualsPredicate(long size)
public static xyz.cofe.collection.Predicate<Fragment> rangePredicate(long begin, long end)
public List<Fragment> find(xyz.cofe.collection.Predicate<Fragment> p)
p - критерийpublic void sort()
public List<Fragment> findZeroSize()
protected Fragment createFagment(long begin, long end)
public void visitEachEachWithoutPosition(xyz.cofe.collection.Func2<Object,Fragment,Fragment> visitor, xyz.cofe.collection.Func2<Boolean,Fragment,Fragment> equals)
visitor - Функция приемник парequals - Функция сравнения на равенствоpublic Map<Fragment,Set<Fragment>> findIntersections()
public List<Fragment> findHoles(long begin, long end)
begin - начало диапазонаend - конец диапазона искл.public List<Fragment> findHoles(long fbegin, long fend, xyz.cofe.collection.Func2<Fragment,Long,Long> fcreateFragment)
fbegin - начало диапазонаfend - конец диапазона искл.fcreateFragment - Создание фрагментаpublic void removeIntersections()
Copyright © 2017. All rights reserved.