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

org.dihedron.patterns.bus.AbstractDestination Maven / Gradle / Ivy

Go to download

Base set of functionalities, including simple utility classes and more complex patterns.

The newest version!
/*
 * Copyright (c) 2012-2014, Andrea Funto'. All rights reserved. See LICENSE for details.
 */ 
package org.dihedron.patterns.bus;


/**
 * @author Andrea Funto'
 */
public abstract class AbstractDestination implements Destination {

	/**
	 * @see java.lang.Object#equals(java.lang.Object)
	 */
	@Override
	@SuppressWarnings("unchecked")
	public boolean equals(Object other) {
		return other != null && other.getClass().equals(this.getClass()) && ((Destination)other).getId().equals(this.getId());
	}
	
	/**
	 * @see java.lang.Object#hashCode()
	 */
	@Override
	public int hashCode() {
		return getId().hashCode();
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy