it.amattioli.encapsulate.range
Class GenericContinousRange<T extends Comparable<T>>

Show UML class diagram
java.lang.Object
  extended by it.amattioli.encapsulate.range.AbstractRange<T>
      extended by it.amattioli.encapsulate.range.ContinousRange<T>
          extended by it.amattioli.encapsulate.range.GenericContinousRange<T>
All Implemented Interfaces:
Range<T>
Direct Known Subclasses:
GenericTimeInterval

public class GenericContinousRange<T extends Comparable<T>>
extends ContinousRange<T>


Constructor Summary
protected GenericContinousRange()
           
  GenericContinousRange(T low, T high)
           
 
Method Summary
 T getHigh()
          Ritorna l'estremo inferiore dell'intervallo.
 T getLow()
          Ritorna l'estremo inferiore dell'intervallo.
 boolean isHighBounded()
          Indica se l'intervallo e' limitato superiormente.
 boolean isLowBounded()
          Indica se l'intervallo e' limitato inferiormente.
protected
<U extends Range<? extends T>>
U
newRange(T low, T high)
          Crea un nuovo range compatibile con questo.
 
Methods inherited from class it.amattioli.encapsulate.range.ContinousRange
abutOn, gap, mergeWith, minus
 
Methods inherited from class it.amattioli.encapsulate.range.AbstractRange
contains, equals, hashCode, hasSameHigh, hasSameLow, includes, intersect, overlaps, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GenericContinousRange

protected GenericContinousRange()

GenericContinousRange

public GenericContinousRange(T low,
                             T high)
Method Detail

getLow

public T getLow()
Description copied from interface: Range
Ritorna l'estremo inferiore dell'intervallo. L'operazione puo' essere effettuata solamente per intervalli che possiedono un estremo inferiore, in caso contrario viene sollevata un'eccezione.

Returns:
l'estremo inferiore dell'intervallo.

getHigh

public T getHigh()
Description copied from interface: Range
Ritorna l'estremo inferiore dell'intervallo. L'operazione puo' essere effettuata solamente per intervalli che possiedono un estremo superiore, in caso contrario viene sollevata un'eccezione.

Returns:
l'estremo inferiore dell'intervallo.

isLowBounded

public boolean isLowBounded()
Description copied from interface: Range
Indica se l'intervallo e' limitato inferiormente.

Returns:
true se l'intervallo e' limitato inferiormente, altrimenti false.

isHighBounded

public boolean isHighBounded()
Description copied from interface: Range
Indica se l'intervallo e' limitato superiormente.

Returns:
true se l'intervallo e' limitato superiormente, altrimenti false.

newRange

protected <U extends Range<? extends T>> U newRange(T low,
                                                    T high)
Description copied from class: AbstractRange
Crea un nuovo range compatibile con questo.

Specified by:
newRange in class AbstractRange<T extends Comparable<T>>
Returns:


Copyright © 2011. All Rights Reserved.