pl.edu.agh.cast.filter
Class HeadFilter

java.lang.Object
  extended by pl.edu.agh.cast.filter.HeadFilter
All Implemented Interfaces:
IFilter

public class HeadFilter
extends Object
implements IFilter

Example filter - returns first N relations from data set.

number (single parameter) is the number of relations to be returned

Author:
AGH CAST Team

Constructor Summary
HeadFilter(String n)
          Parametrized constructor.
 
Method Summary
 Collection<IRelation> filter(DataSet dataSet)
          Returns the head of the data set, i.e.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HeadFilter

public HeadFilter(String n)
Parametrized constructor.

Parameters:
n - The number of rows to be returned.
Method Detail

filter

public Collection<IRelation> filter(DataSet dataSet)
Returns the head of the data set, i.e. the first n relations.

Specified by:
filter in interface IFilter
Parameters:
dataSet - The data set to filter
Returns:
Collection of relations


Copyright © 2007-2009 IISG AGH-UST Krakow, Poland. All Rights Reserved.