2
* Copyright (C) 2008 Steve Ratcliffe
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License version 2 as
6
* published by the Free Software Foundation.
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
14
* Author: Steve Ratcliffe
15
* Create date: 03-Nov-2008
17
package uk.me.parabola.mkgmap.osmstyle.eval;
19
import uk.me.parabola.mkgmap.reader.osm.Element;
22
* Holds tag=value relationship.
24
* @author Steve Ratcliffe
26
public class EqualsOp extends BinaryOp {
31
public boolean eval(Element el) {
32
String key = getFirst().toString();
33
String value = getSecond().toString();
35
String s = el.getTag(key);
38
return s.equals(value);
41
public int priority() {
45
public String toString() {
46
return getFirst().toString() + '=' + getSecond();