Evaluates the given object against this expression.


@param o The object to evaluate.
@return True if the given object matches this expression, false otherwise.
769419
public org.geolatte.geom.Geometry evaluate(Object o) {

        EntityClassReader classReader = EntityClassReader.getClassReaderFor(o.getClass(), null, "id");
        Object result = null;
        try {
            result = classReader.getPropertyValue(o, propertyName);
        }
        catch (InvalidObjectReaderException e) {
            ; // can never occur
        }

        if (!(result instanceof Geometry))
                return null;

        return (Geometry)result;
    }
982848
public boolean matches(Action<?, ?> action, Object object) {
        return this.action == action && object != null && entityType.isAssignableFrom(object.getClass());
    }
16841
@Override
	public int compareTo(Column o) {
		int diff = name.compareToIgnoreCase(o.name);
		if(diff!=0) return diff;
		return name.compareTo(o.name);
	}
1813
@Override
    public boolean isEqual(Object o) {
        if (o == this) {
            return true;
        }
        if (!(o instanceof TemporalParameter)) {
            return false;
        }

        TemporalParameter p = (TemporalParameter) o;
        return super.isEqual(p)
                && (this.value == p.value
                || (this.value != null && this.value.equals(p.value)));
    }
1150200
@Override
    public int compareTo(Identifier o) {
        if (o == null) {
            throw new IllegalArgumentException("Unable to compare a null identifier");
        }
        return new CompareToBuilder()
                .append(this.value, o.toString())
                .append(this.url, o.getUrl())
                .append(this.confidence, o.getConfidence())
                .toComparison();
    }
133655
public boolean contains(Object o) {
	for(T e : elemArray) {
	    if((o == e) || ((o != null) && o.equals(e))) {
		return true;
	    }
	}
	return false;
    }
96941
public final int compareTo(AbstractRule o)
	{
		Integer us = new Integer(this.getSpecificity());
		Integer them = new Integer(o.getSpecificity());
		return them.compareTo(us);
	}
723889
public Criteria is(@Nullable Object o) {
		if (o == null) {
			return isNull();
		}
		predicates.add(new Predicate(OperationKey.EQUALS, o));
		return this;
	}
632847
@Override
    public boolean contains(Object o) {
        synchronized (this) {

            synchronized (lock) {
                //First check the expedited buffer
                //Check if we wrap around the end of the array before iterating
                if (expeditedPutIndex > expeditedTakeIndex) {
                    for (int i = expeditedTakeIndex; i <= expeditedPutIndex; i++) {
                        if (o.equals(expeditedBuffer[i])) {
                            return true;
                        }
                    }
                } else {
                    //We wrap around the array. Loop through in two passes(upper and lower)
                    for (int i = expeditedTakeIndex; i < expeditedBuffer.length; i++) {
                        if (o.equals(expeditedBuffer[i])) {
                            return true;
                        }
                    }
                    for (int i = 0; i < expeditedPutIndex; i++) {
                        if (o.equals(expeditedBuffer[i])) {
                            return true;
                        }
                    }
                }

                //Next check the main buffer
                //Check if we wrap around the end of the array before iterating
                if (putIndex > takeIndex) {
                    for (int i = takeIndex; i <= putIndex; i++) {
                        if (o.equals(buffer[i])) {
                            return true;
                        }
                    }
                } else {
                    //We wrap around the array. Loop through in two passes(upper and lower)
                    for (int i = takeIndex; i < buffer.length; i++) {
                        if (o.equals(buffer[i])) {
                            return true;
                        }
                    }
                    for (int i = 0; i < putIndex; i++) {
                        if (o.equals(buffer[i])) {
                            return true;
                        }
                    }
                }
            }
        }

        return false;
    }
536120
private boolean isEqual(Object o1, Object o2) {
		return o1 == null ? o2 == null : o1.equals(o2);
	}
776052
private boolean eq(final Object o1, final Object o2) {

		if (o1 == null && o2 == null) {
			return true;
		}

		if ((o1 == null && o2 != null) || (o1 != null && o2 == null)) {
			return false;
		}

		try {

			if (o1 instanceof Number && o2 instanceof Number) {

				return compareNumberNumber(o1, o2) == 0;

			} else if (o1 instanceof String && o2 instanceof String) {

				return compareStringString(o1, o2) == 0;

			} else if (o1 instanceof Date && o2 instanceof Date) {

				return compareDateDate(o1, o2) == 0;

			} else if (o1 instanceof Date && o2 instanceof String) {

				return compareDateString(o1, o2) == 0;

			} else if (o1 instanceof String && o2 instanceof Date) {

				return compareStringDate(o1, o2) == 0;

			} else if (o1 instanceof Boolean && o2 instanceof String) {

				return compareBooleanString((Boolean)o1, (String)o2) == 0;

			} else if (o1 instanceof String && o2 instanceof Boolean) {

				return compareStringBoolean((String)o1, (Boolean)o2) == 0;

			} else if (o1 instanceof Number && o2 instanceof String) {

				return compareNumberString((Number)o1, (String)o2) == 0;

			} else if (o1 instanceof String && o2 instanceof Number) {

				return compareStringNumber((String)o1, (Number)o2) == 0;

			} else {

				return compareStringString(o1.toString(), o2.toString()) == 0;

			}

		} catch (NumberFormatException nfe) {

			return false;

		}
	}
286563
public int compareTo(Object o)
   {
      MBeanData md = (MBeanData) o;
      String d1 = objectName.getDomain();
      String d2 = md.objectName.getDomain();
      int compare = d1.compareTo(d2);
      if (compare == 0)
      {
         String p1 = objectName.getCanonicalKeyPropertyListString();
         String p2 = md.objectName.getCanonicalKeyPropertyListString();
         compare = p1.compareTo(p2);
      }
      return compare;
   }
1218975
private static final boolean match(Object o1, Object o2) {
        return o1 instanceof String[] && o2 instanceof String[]
                        ? Arrays.deepEquals((String[]) o1, (String[]) o2)
                        : AdapterUtil.match(o1, o2);
    }
138054
public boolean assessMatch(final OgnlContext ognlContext) throws OgnlException
	{

		if (! inputRun)
		{
			throw new IllegalArgumentException("Attempted to match on a rule whose rulesets input has not yet been produced");
		}

		final Object result = condition.run(ognlContext, ognlContext);

		if (result == null || !Boolean.class.isAssignableFrom(result.getClass()))
		{
			throw new IllegalArgumentException("Expression " + condition.getOriginalExpression() +
			                                   " did not return a boolean value");
		}

		matches = (Boolean) result;

		return matches;
	}
925028
public int compareTo(Object o) {
		ViewDescriptor castObj = (ViewDescriptor)o;
		return this.getDisplayName().compareToIgnoreCase(castObj.getDisplayName());
	}
1341871
public int compareTo(Object o) {
        float thisValue = this.value;
        float thatValue = ((FloatWritable) o).value;
        return (thisValue < thatValue ? -1 : (thisValue == thatValue ? 0 : 1));
    }
1109970
protected boolean evaluate(String value) {
        if (ValidationMatcherUtils.isValidationMatcherExpression(matchingValue)) {
            try {
                ValidationMatcherUtils.resolveValidationMatcher(selectKey, value, matchingValue, context);
                return true;
            } catch (ValidationException e) {
                return false;
            }
        } else {
            return value.equals(matchingValue);
        }
    }