protected Object getValue(Transformable subjectValue, Transformable objectValue) { double thresholdValue = threshold.doubleValue(); if (subjectValue.getDistanceSquaredTo(objectValue) > thresholdValue * thresholdValue) { return Boolean.TRUE; } else { return Boolean.FALSE; } }
public Object getValue(edu.cmu.cs.stage3.alice.core.Array arrayValue) { int i = index.intValue(); int n = arrayValue.size(); if (i >= 0 && i < n) { return arrayValue.itemValueAtIndex(i); } else { throw new edu.cmu.cs.stage3.alice.core.SimulationException( "index out of bounds exception. " + i + " is not in range [0," + n + ")", null, this); } }