public abstract class Windowing extends Object
| Constructor and Description |
|---|
Windowing() |
| Modifier and Type | Method and Description |
|---|---|
static <T> Iterator<List<Maybe<T>>> |
centered(int windowSize,
Iterable<T> iterable)
Adapts an iterable to an iterator showing a sliding centered window of
the contained elements.
|
static <W extends Collection<Maybe<T>>,T> |
centered(int windowSize,
Iterable<T> iterable,
Provider<W> provider)
Adapts an iterable to an iterator showing a sliding centered window of
the contained elements.
|
static <T> Iterator<List<Maybe<T>>> |
centered(int windowSize,
Iterator<T> iterator)
Adapts an iterator to an iterator showing a sliding centered window of
the contained elements.
|
static <W extends Collection<Maybe<T>>,T> |
centered(int windowSize,
Iterator<T> iterator,
Provider<W> provider)
Adapts an iterator to an iterator showing a sliding centered window of
the contained elements.
|
static <T> Iterator<Queue<Maybe<T>>> |
trails(int trailSize,
Iterable<T> iterable)
Adapts an iterator to an iterator showing predecessors of the contained
elements.
|
static <W extends Collection<?>,T> |
trails(int trailSize,
Iterable<T> iterable,
Delegate<W,Queue<Maybe<T>>> copy)
Adapts an iterator to an iterator showing predecessors of the contained
elements.
|
static <T> Iterator<Queue<Maybe<T>>> |
trails(int trailSize,
Iterator<T> iterator)
Adapts an iterator to an iterator showing predecessors of the contained
elements.
|
static <W extends Collection<?>,T> |
trails(int trailSize,
Iterator<T> iterator,
Delegate<W,Queue<Maybe<T>>> copy)
Adapts an iterator to an iterator showing predecessors of the contained
elements.
|
static <T> Iterator<List<T>> |
window(int windowSize,
Iterable<T> iterable)
Adapts an iterable to an iterator showing a sliding window of the
contained elements.
|
static <W extends Collection<T>,T> |
window(int windowSize,
Iterable<T> iterable,
Provider<W> provider)
Adapts an iterable to an iterator showing a sliding window of the
contained elements.
|
static <T> Iterator<List<T>> |
window(int windowSize,
Iterator<T> iterator)
Adapts an iterator to an iterator showing a sliding window of the
contained elements.
|
static <W extends Collection<T>,T> |
window(int windowSize,
Iterator<T> iterator,
Provider<W> provider)
Adapts an iterator to an iterator showing a sliding window of the
contained elements.
|
public static <T> Iterator<List<T>> window(int windowSize, Iterator<T> iterator)
T - the iterator element typewindowSize - the window sizeiterator - the iterator to be adaptedpublic static <T> Iterator<List<T>> window(int windowSize, Iterable<T> iterable)
T - the iterator element typewindowSize - the window sizeiterable - the iterable to be adaptedpublic static <W extends Collection<T>,T> Iterator<W> window(int windowSize, Iterator<T> iterator, Provider<W> provider)
W - the window typeT - the iterator element typewindowSize - the window sizeiterator - the iterable to be adaptedprovider - the provider providing the window collectionpublic static <W extends Collection<T>,T> Iterator<W> window(int windowSize, Iterable<T> iterable, Provider<W> provider)
W - the window typeT - the iterator element typewindowSize - the window sizeiterable - the iterable to be adaptedprovider - the provider providing the window collectionpublic static <T> Iterator<List<Maybe<T>>> centered(int windowSize, Iterator<T> iterator)
T - the iterator element typewindowSize - the window size (must be an odd positive integer)iterator - the iterator to be adaptedpublic static <T> Iterator<List<Maybe<T>>> centered(int windowSize, Iterable<T> iterable)
T - the iterator element typewindowSize - the window size (must be an odd positive integer)iterable - the iterable to be adaptedpublic static <W extends Collection<Maybe<T>>,T> Iterator<W> centered(int windowSize, Iterator<T> iterator, Provider<W> provider)
W - the window typeT - the iterator element typewindowSize - the window size (must be an odd positive integer)iterator - the iterator to be adaptedprovider - the provider providing the window collectionpublic static <W extends Collection<Maybe<T>>,T> Iterator<W> centered(int windowSize, Iterable<T> iterable, Provider<W> provider)
W - the window typeT - the iterator element typewindowSize - the window size (must be an odd positive integer)iterable - the iterable to be adaptedprovider - the provider providing the window collectionpublic static <T> Iterator<Queue<Maybe<T>>> trails(int trailSize, Iterator<T> iterator)
iterator: [1,2,3,4], trailSize: 3 ->
[[Nothing, Nothing, Just 1],[Nothing Just 1, Just 2], [Just 1, Just 2, Just 3], [Just 2, Just 3, Just 4]]
T - the adapted iterator element typetrailSize - the trail sizeiterator - the iterator to be adaptedpublic static <W extends Collection<?>,T> Iterator<W> trails(int trailSize, Iterator<T> iterator, Delegate<W,Queue<Maybe<T>>> copy)
iterator: [1,2,3,4], trailSize: 3 ->
[[Nothing, Nothing, Just 1],[Nothing Just 1, Just 2], [Just 1, Just 2, Just 3], [Just 2, Just 3, Just 4]]
W - the window typeT - the adapted iterator element typetrailSize - the trail sizeiterator - the iterator to be adaptedcopy - copy semantics for the internal queuepublic static <T> Iterator<Queue<Maybe<T>>> trails(int trailSize, Iterable<T> iterable)
iterable: [1,2,3,4], trailSize: 3 ->
[[Nothing, Nothing, Just 1],[Nothing Just 1, Just 2], [Just 1, Just 2, Just 3], [Just 2, Just 3, Just 4]]
T - the adapted iterator element typetrailSize - the trail sizeiterable - the iterable to be adaptedpublic static <W extends Collection<?>,T> Iterator<W> trails(int trailSize, Iterable<T> iterable, Delegate<W,Queue<Maybe<T>>> copy)
iterable: [1,2,3,4], trailSize: 3 ->
[[Nothing, Nothing, Just 1],[Nothing Just 1, Just 2], [Just 1, Just 2, Just 3], [Just 2, Just 3, Just 4]]
W - the window typeT - the adapted iterator element typetrailSize - the trail sizeiterable - the iterable to be adaptedcopy - copy semantics for the internal queueCopyright © 2013. All Rights Reserved.