All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.anotheria.util.slicer.Segment Maven / Gradle / Ivy

package net.anotheria.util.slicer;

import java.io.Serializable;

/**
 * Used as parameter class in a slice request.
 *
 * @author lrosenberg
 * @version $Id: $Id
 */
public class Segment implements Serializable {
	
	/**
	 * Default serialVersion variable.
	 */
	private static final long serialVersionUID = -1075806075594192415L;

	/**
	 * The requested slice number.
	 */
	private int sliceNumber;
	
	/**
	 * Number of the elements per slice (number of items on a page).
	 */
	private int elementsPerSlice;
	
	/**
	 * Creates a new Segment with given slice number and elements per page.
	 *
	 * @param aSliceNumber a int.
	 * @param aElementsPerSlice a int.
	 */
	public Segment(int aSliceNumber, int aElementsPerSlice){
		sliceNumber = aSliceNumber;
		elementsPerSlice = aElementsPerSlice;
	}
	
	/**
	 * 

Constructor for Segment.

*/ public Segment(){ } /** *

Getter for the field elementsPerSlice.

* * @return a int. */ public int getElementsPerSlice() { return elementsPerSlice; } /** *

Setter for the field elementsPerSlice.

* * @param aElementsPerSlice a int. */ public void setElementsPerSlice(int aElementsPerSlice) { this.elementsPerSlice = aElementsPerSlice; } /** *

Getter for the field sliceNumber.

* * @return a int. */ public int getSliceNumber() { return sliceNumber; } /** *

Setter for the field sliceNumber.

* * @param aSliceNumber a int. */ public void setSliceNumber(int aSliceNumber) { this.sliceNumber = aSliceNumber; } /** {@inheritDoc} */ @Override public String toString(){ return "SliceNumber: "+ sliceNumber +", ElementsPerSlice: "+ elementsPerSlice; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy