All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.sf.extcos.internal.AbstractTypeFilterJunction Maven / Gradle / Ivy

package net.sf.extcos.internal;

import java.util.Set;

import net.sf.extcos.selector.TypeFilter;
import net.sf.extcos.selector.TypeFilterJunction;

public class AbstractTypeFilterJunction implements TypeFilterJunction {
	protected Set typeFilters;

	@Override
	public Set getTypeFilters() {
		return typeFilters;
	}

	/* (non-Javadoc)
	 * @see java.lang.Object#hashCode()
	 */
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ (typeFilters == null ? 0 : typeFilters.hashCode());
		return result;
	}

	/* (non-Javadoc)
	 * @see java.lang.Object#equals(java.lang.Object)
	 */
	@Override
	public boolean equals(final Object obj) {
		if (this == obj) {
			return true;
		}
		if (obj == null) {
			return false;
		}
		if (getClass() != obj.getClass()) {
			return false;
		}
		TypeFilterConjunction other = (TypeFilterConjunction) obj;
		if (typeFilters == null) {
			if (other.typeFilters != null) {
				return false;
			}
		} else if (!typeFilters.equals(other.typeFilters)) {
			return false;
		}
		return true;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy