it.amattioli.encapsulate.range
Class GenericDiscreteRange<T extends Discrete<T>>

Show UML class diagram
java.lang.Object
  extended by it.amattioli.encapsulate.range.AbstractRange<T>
      extended by it.amattioli.encapsulate.range.DiscreteRange<T>
          extended by it.amattioli.encapsulate.range.GenericDiscreteRange<T>
All Implemented Interfaces:
Range<T>, Iterable<T>

public class GenericDiscreteRange<T extends Discrete<T>>
extends DiscreteRange<T>


Constructor Summary
GenericDiscreteRange(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.DiscreteRange
abutOn, gap, iterator, 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

GenericDiscreteRange

public GenericDiscreteRange(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 Discrete<T>>
Returns:


Copyright © 2011. All Rights Reserved.