com.bigdata.relation.rule
Class Slice

java.lang.Object
  extended by com.bigdata.relation.rule.Slice
All Implemented Interfaces:
ISlice, Serializable

public class Slice
extends Object
implements ISlice

Default implementation.

Version:
$Id: Slice.java 2265 2009-10-26 12:51:06Z thompsonbry $
Author:
Bryan Thompson
See Also:
Serialized Form

Field Summary
static ISlice ALL
          A slice corresponding to all results (offset is zero, limit is Long.MAX_VALUE).
 
Constructor Summary
Slice(long offset, long limit)
           
 
Method Summary
 long getLast()
          The index of the last solution that we will generate (OFFSET + LIMIT).
 long getLimit()
          The maximum #of solutions to be returned to the caller.
 long getOffset()
          The first solution to be returned to the caller.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ALL

public static final transient ISlice ALL
A slice corresponding to all results (offset is zero, limit is Long.MAX_VALUE).

Constructor Detail

Slice

public Slice(long offset,
             long limit)
Parameters:
offset -
limit -
Throws:
IllegalArgumentException - if offset is negative.
IllegalArgumentException - if limit is non-positive.
Method Detail

getOffset

public long getOffset()
Description copied from interface: ISlice
The first solution to be returned to the caller. A value of ZERO (0) indicates that all solutions should be returned.

Specified by:
getOffset in interface ISlice

getLimit

public long getLimit()
Description copied from interface: ISlice
The maximum #of solutions to be returned to the caller. A value of Long.MAX_VALUE indicates that there is no limit.

Specified by:
getLimit in interface ISlice

getLast

public long getLast()
Description copied from interface: ISlice
The index of the last solution that we will generate (OFFSET + LIMIT). If OFFSET + LIMIT would be greater than Long.MAX_VALUE, then use Long.MAX_VALUE instead.

Specified by:
getLast in interface ISlice

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2006-2009 SYSTAP, LLC. All Rights Reserved.