Back to project page interdroid-swan.
The source code is released under:
Copyright (c) 2008-2011 Vrije Universiteit, The Netherlands All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the follo...
If you think the Android project interdroid-swan listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package interdroid.swan.swansong; /*w ww . j ava 2 s . c o m*/ public class ComparisonExpression implements TriStateExpression { private ValueExpression mLeft; private Comparator mComparator; private ValueExpression mRight; private String mLocation; public ComparisonExpression(String location, ValueExpression left, Comparator comparator, ValueExpression right) { this.mLocation = location; this.mLeft = left; this.mComparator = comparator; this.mRight = right; } @Override public String toParseString() { return mLeft.toParseString() + " " + mComparator.toParseString() + " " + mRight.toParseString(); } public ValueExpression getLeft() { return mLeft; } public ValueExpression getRight() { return mRight; } @Override public String getLocation() { return mLocation; } @Override public void setInferredLocation(String location) { if (mLocation.equals(Expression.LOCATION_INFER)) { mLocation = location; return; } throw new RuntimeException("Trying to set inferred location from '" + mLocation + "' to '" + location + "'. Please don't use this method. For internal use only."); } public Comparator getComparator() { return mComparator; } }