com.googlecode.whatswrong
Class Bounds1D

java.lang.Object
  extended by com.googlecode.whatswrong.Bounds1D

public class Bounds1D
extends java.lang.Object

This class represents one dimensional bounds.

Author:
Sebastian Riedel

Field Summary
 int from
          Where do the bounds start
 int to
          Where do the bounds end.
 
Constructor Summary
Bounds1D(int from, int to)
          Create a new Bounds1D object for the given bounds.
 
Method Summary
 int getMiddle()
          Get middle of the bounds.
 int getWidth()
          Return the total width of the bounds
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

from

public final int from
Where do the bounds start


to

public final int to
Where do the bounds end.

Constructor Detail

Bounds1D

public Bounds1D(int from,
                int to)
Create a new Bounds1D object for the given bounds.

Parameters:
from - where do the bounds start.
to - where do the bounds end.
Method Detail

getWidth

public int getWidth()
Return the total width of the bounds

Returns:
width of bounds.

getMiddle

public int getMiddle()
Get middle of the bounds.

Returns:
the middle of the bounds.


Copyright © 2010. All Rights Reserved.