de.unibi.techfak.jpredictor.gui
Class Distance

java.lang.Object
  extended by de.unibi.techfak.jpredictor.gui.Distance
All Implemented Interfaces:
java.lang.Cloneable

public class Distance
extends java.lang.Object
implements java.lang.Cloneable


Field Summary
private  int max
          The maximal distance as an int value.
private  int min
          The minimal distance as an int value.
 
Constructor Summary
Distance()
          Constructs the object and sets distance to zero.
Distance(Distance dist)
          Constructs the object and sets the distance.
Distance(int dist)
          Constructs the object and sets the distance to zero, since both min and max are set to dist.
Distance(int mindist, int maxdist)
          Constructs the object and sets the distance.
 
Method Summary
 java.lang.Object clone()
           
 int max()
           
 int min()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

min

private int min
The minimal distance as an int value.


max

private int max
The maximal distance as an int value.

Constructor Detail

Distance

public Distance()
Constructs the object and sets distance to zero.


Distance

public Distance(int dist)
Constructs the object and sets the distance to zero, since both min and max are set to dist.

Parameters:
dist - The new distance.

Distance

public Distance(int mindist,
                int maxdist)
Constructs the object and sets the distance. If mindist is greater than maxdist, both are changed.

Parameters:
mindist - The minimal distance.
maxdist - The maximal distance.

Distance

public Distance(Distance dist)
Constructs the object and sets the distance. If mindist is greater than maxdist, both are changed.

Parameters:
dist - The initial distance.
Method Detail

min

public int min()
Returns:
The minimal distance.

max

public int max()
Returns:
The maximal distance.

clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object

toString

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