@SuppressWarnings("unchecked")
public boolean isInBounds( Interval<?, ?> inter ) {
boolean result = false;
if ( inter != null ) {
if ( inter.min.type.isCompatible( min.type ) ) {
int comp = min.value.compareTo( (T) inter.min.value );
result = match( comp, inter.closure, true );
if ( result ) {
comp = min.value.compareTo( (T) inter.max.value );
result = match( comp, inter.closure, false );
if ( result ) {
comp = max.value.compareTo( (T) inter.max.value );
result = match( comp, inter.closure, false );
}
}
}
}
return result;
}