view src/main/java/cl/maps/utils/AttKey.java @ 71:aeb29e362a67

New ArabicNormalizer. NormalizerUtils.normalize() now does both translit and arabic normalization. 108: arabic normalization is not applied Task-Url: https://it-dev.mpiwg-berlin.mpg.de/tracs/ismi/ticket/108
author casties
date Thu, 02 Feb 2017 17:58:52 +0100
parents 615d27dce9b3
children
line wrap: on
line source

package cl.maps.utils;

import org.apache.commons.lang.StringUtils;

public class AttKey{
	private String oc;
	private String attName;
	
	public AttKey(String oc, String attName){
		this.oc = oc;
		this.attName = attName;
	}

	public String getOc() {
		return oc;
	}

	public void setOc(String oc) {
		this.oc = oc;
	}

	public String getAttName() {
		return attName;
	}

	public void setAttName(String attName) {
		this.attName = attName;
	}
	
	@Override
    public int hashCode() {
		String s = this.oc + this.attName;
		return s.hashCode();
	}
	
	@Override
	public boolean equals(Object o){
		if(o instanceof AttKey){
			AttKey other = (AttKey)o;
			if(StringUtils.equals(oc, other.oc) &&
					StringUtils.equals(attName, other.attName)){
				return true;
			}
		}
		return false;
	}
	
	@Override
	public String toString(){
		return "AttKey [" + oc + ", " + attName + "]";
	}
	
}