Ejemplo n.º 1
0
 @Override
 public boolean isPreceding(final IFloatSet set) {
   final IFloatBound lowerBound = set.getLowerBound();
   final IFloatBound upperBound = getUpperBound();
   if (lowerBound != null && upperBound != null) {
     return (lowerBound.getValue() == upperBound.getValue())
         && (upperBound.isClosed() != lowerBound.isClosed());
   }
   return false;
 }
Ejemplo n.º 2
0
 @Override
 public boolean equals(@Nullable final Object obj) {
   if (obj instanceof IFloatSet) {
     final IFloatSet set = (IFloatSet) obj;
     if (set.isDegenerate()) {
       final IFloatBound lowerBound = set.getLowerBound();
       if (lowerBound != null) return getValue() == lowerBound.getValue();
       throw new NullPointerException();
     }
   }
   if (obj instanceof Float) {
     return getValue() == ((Float) obj);
   }
   return false;
 }