private boolean matches(@Nullable Object obj,String operator,String operandStr){
  ObsValue value;
  if (obj == null) {
switch (operator) {
case "":
case "=":
case "==":
      return operandStr.isEmpty();
default :
    return false;
}
}
 else if (obj instanceof ObsPoint) {
value=((ObsPoint)obj).value;
}
 else if (obj instanceof ObsValue) {
value=(ObsValue)obj;
}
 else return false;
ObsValue operand=null;
if (value.uuid != null) {
operand=ObsValue.newCoded(Utils.expandUuid(operandStr));
}
 else if (value.number != null) {
try {
  operand=ObsValue.newNumber(Double.valueOf(operandStr));
}
 catch (NumberFormatException e) {
  operand=ObsValue.ZERO;
}
}
 else if (value.text != null) {
operand=ObsValue.newText(operandStr);
}
 else if (value.date != null) {
try {
  operand=ObsValue.newDate(LocalDate.parse(operandStr));
}
 catch (IllegalArgumentException e) {
  operand=ObsValue.MIN_DATE;
}
}
 else if (value.instant != null) {
try {
  operand=ObsValue.newTime(Long.valueOf(operandStr));
}
 catch (IllegalArgumentException e) {
  operand=ObsValue.MIN_TIME;
}
}
switch (operator) {
case "":
case "=":
case "==":
return Objects.equal(value.uuid,operand.uuid);
case "<":
return value.compareTo(operand) < 0;
case "<=":
return value.compareTo(operand) <= 0;
case ">":
return value.compareTo(operand) > 0;
case ">=":
return value.compareTo(operand) >= 0;
}
return false;
}

private boolean matches ( @ Nullable Object obj , String operator , String operandStr ) { ObsValue value ; if ( obj == null ) { switch ( operator ) { case "" : case "=" : case "==" : return operandStr . isEmpty ( ) ; default : return false ; } } else if ( obj instanceof ObsPoint ) { value = ( ( ObsPoint ) obj ) . value ; } else if ( obj instanceof ObsValue ) { value = ( ObsValue ) obj ; } else return false ; ObsValue operand = null ; if ( value . uuid != null ) { operand = ObsValue . newCoded ( Utils . expandUuid ( operandStr ) ) ; } else if ( value . number != null ) { try { operand = ObsValue . newNumber ( Double . valueOf ( operandStr ) ) ; } catch ( NumberFormatException e ) { operand = ObsValue . ZERO ; } } else if ( value . text != null ) { operand = ObsValue . newText ( operandStr ) ; } else if ( value . date != null ) { try { operand = ObsValue . newDate ( LocalDate . parse ( operandStr ) ) ; } catch ( IllegalArgumentException e ) { operand = ObsValue . MIN_DATE ; } } else if ( value . instant != null ) { try { operand = ObsValue . newTime ( Long . valueOf ( operandStr ) ) ; } catch ( IllegalArgumentException e ) { operand = ObsValue . MIN_TIME ; } } switch ( operator ) { case "" : case "=" : case "==" : return Objects . equal ( value . uuid , operand . uuid ) ; case "<" : return value . compareTo ( operand ) < 0 ; case "<=" : return value . compareTo ( operand ) <= 0 ; case ">" : return value . compareTo ( operand ) > 0 ; case ">=" : return value . compareTo ( operand ) >= 0 ; } return false ; }
returns true if an observed value matches the given condition .
