sonification.dataimport.visbards_resourcetoolkit.util
Class Range

java.lang.Object
  extended by sonification.dataimport.visbards_resourcetoolkit.util.Range

public class Range
extends java.lang.Object


Field Summary
 double fEnd
           
 double fStart
           
 
Constructor Summary
Range()
           
Range(double start, double end)
          Takes start and end.
Range(Range rng)
          A simple clone constructor.
 
Method Summary
 boolean contains(double val)
           
 boolean contains(Range range)
          returns true if the current time range contains the given time range, false otherwise.
 void crop(Range range)
          Crop the given range to this range.
 boolean equals(java.lang.Object obj)
          checks for equality
 void expand(Range range)
          Expand the range to the given range
 java.util.Date getEndDate()
           
 double getExtent()
          returns the current extent based on end - start
 java.util.Date getStartDate()
           
 boolean intersects(Range range)
           
 boolean isGreaterThan(Range rng)
           
 boolean isInverted()
           
 boolean isLessThan(Range rng)
           
 float normalize(double scal)
          Returns the normalized scalar.
 float normalize(float scal)
          Returns the normalized scalar.
 float[] normalizeVector(double[] vec)
           
 float[] normalizeVector(float[] vec)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

fStart

public double fStart

fEnd

public double fEnd
Constructor Detail

Range

public Range(double start,
             double end)
Takes start and end. Computes extent.


Range

public Range()

Range

public Range(Range rng)
A simple clone constructor.

Method Detail

getExtent

public double getExtent()
returns the current extent based on end - start


isInverted

public boolean isInverted()

isLessThan

public boolean isLessThan(Range rng)

isGreaterThan

public boolean isGreaterThan(Range rng)

contains

public boolean contains(double val)

intersects

public boolean intersects(Range range)

contains

public boolean contains(Range range)
returns true if the current time range contains the given time range, false otherwise. Note: the start or end values can be the same as those of the given range for it to be contained


crop

public void crop(Range range)
Crop the given range to this range. After this operation this.contains(range) will return true.


expand

public void expand(Range range)
Expand the range to the given range


normalize

public float normalize(float scal)
Returns the normalized scalar.


normalizeVector

public float[] normalizeVector(float[] vec)

normalize

public float normalize(double scal)
Returns the normalized scalar.


normalizeVector

public float[] normalizeVector(double[] vec)

getStartDate

public java.util.Date getStartDate()

getEndDate

public java.util.Date getEndDate()

equals

public boolean equals(java.lang.Object obj)
checks for equality

Overrides:
equals in class java.lang.Object

toString

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