001    // License: GPL. For details, see LICENSE file.
002    package org.openstreetmap.josm.gui.mappaint;
003    
004    import org.openstreetmap.josm.tools.Utils;
005    
006    public class Keyword {
007        public final String val;
008    
009        public Keyword(String val) {
010            this.val = val.toLowerCase();
011        }
012    
013        @Override
014        public String toString() {
015            return "Keyword{" + val + '}';
016        }
017    
018        @Override
019        public boolean equals(Object obj) {
020            if (obj == null || getClass() != obj.getClass())
021                return false;
022            return Utils.equal(val, ((Keyword) obj).val);
023        }
024    
025        @Override
026        public int hashCode() {
027            return val.hashCode();
028        }
029    
030        public final static Keyword AUTO = new Keyword("auto");
031        public final static Keyword BOTTOM = new Keyword("bottom");
032        public final static Keyword CENTER = new Keyword("center");
033        public final static Keyword DEFAULT = new Keyword("default");
034        public final static Keyword RIGHT = new Keyword("right");
035        public final static Keyword THINNEST = new Keyword("thinnest");
036    }