fr.cnes.sitools.dataset.database
Class Range

java.lang.Object
  extended by fr.cnes.sitools.dataset.database.Range
All Implemented Interfaces:
java.lang.Comparable<Range>

public class Range
extends java.lang.Object
implements java.lang.Comparable<Range>

Object to store range between to integer

Author:
m.gond

Constructor Summary
Range()
          Default constructor
Range(int start, int end)
          Constuctor with start and end
 
Method Summary
 int compareTo(Range o)
           
 int getEnd()
          Gets the end value
 int getSize()
          Calculate the range size
 int getStart()
          Gets the start value
 void setEnd(int end)
          Sets the value of end
 void setStart(int start)
          Sets the value of start
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Range

public Range()
Default constructor


Range

public Range(int start,
             int end)
Constuctor with start and end

Parameters:
start - the start param
end - the end param
Method Detail

getStart

public int getStart()
Gets the start value

Returns:
the start

setStart

public void setStart(int start)
Sets the value of start

Parameters:
start - the start to set

getEnd

public int getEnd()
Gets the end value

Returns:
the end

setEnd

public void setEnd(int end)
Sets the value of end

Parameters:
end - the end to set

getSize

public int getSize()
Calculate the range size

Returns:
the rangeSize

compareTo

public int compareTo(Range o)
Specified by:
compareTo in interface java.lang.Comparable<Range>

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2010-2013 CNES. All Rights Reserved.