Package elki.datasource.filter.selection
Class FirstNStreamFilter
- java.lang.Object
-
- elki.datasource.filter.AbstractStreamFilter
-
- elki.datasource.filter.selection.FirstNStreamFilter
-
- All Implemented Interfaces:
BundleStreamSource
,ObjectFilter
,StreamFilter
public class FirstNStreamFilter extends AbstractStreamFilter
Keep only the first N elements of the data source.- Since:
- 0.7.5
- Author:
- Erich Schubert
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
FirstNStreamFilter.Par
Parameterization class-
Nested classes/interfaces inherited from interface elki.datasource.bundle.BundleStreamSource
BundleStreamSource.Event
-
-
Field Summary
Fields Modifier and Type Field Description protected int
n
Remaining entries to keep-
Fields inherited from class elki.datasource.filter.AbstractStreamFilter
source
-
-
Constructor Summary
Constructors Constructor Description FirstNStreamFilter(int n)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
data(int rnum)
Access a particular object and representation.BundleMeta
getMeta()
Get the current meta data.BundleStreamSource.Event
nextEvent()
Get the next event-
Methods inherited from class elki.datasource.filter.AbstractStreamFilter
asMultipleObjectsBundle, assignDBID, filter, hasDBIDs, init, toString
-
-
-
-
Method Detail
-
getMeta
public BundleMeta getMeta()
Description copied from interface:BundleStreamSource
Get the current meta data.- Returns:
- Metadata
-
data
public java.lang.Object data(int rnum)
Description copied from interface:BundleStreamSource
Access a particular object and representation.- Parameters:
rnum
- Representation number- Returns:
- Contained data
-
nextEvent
public BundleStreamSource.Event nextEvent()
Description copied from interface:BundleStreamSource
Get the next event- Returns:
- Event type
-
-