my code stock.com

Snippet options

Download: Download snippet as diccionario.java.
Copy snippet: For this you need a free my code stock.com account.
Embed code : You will find the embed code for this snippet at the end of the page, if you want to embed it into a website or a blog!

package diccionario;

public class Par <C,S>{ 
	C clave;
	S significado;
	
	
	public Par(){
		this.clave = null;
		this.significado = null;
	}

public void setClave(C c){
	this.clave = c;
}
	
public void setSignificado(S s){
	this.significado = s;
}

 public  C getClave(){
	return this.clave;	
	}
	
 public S getSignificado(){
	 return this.significado;
 }

@Override
public String toString() {
	return "Par [clave=" + clave + ", significado=" + significado + "]";
}

@Override
public int hashCode() {
	final int prime = 31;
	int result = 1;
	result = prime * result + ((clave == null) ? 0 : clave.hashCode());
	result = prime * result + ((significado == null) ? 0 : significado.hashCode());
	return result;
}

@Override
public boolean equals(Object obj) {
	if (this == obj)
		return true;
	if (obj == null)
		return false;
	if (getClass() != obj.getClass())
		return false;
	Par other = (Par) obj;
	if (clave == null) {
		if (other.clave != null)
			return false;
	} else if (!clave.equals(other.clave))
		return false;
	return true;
}
 
 
 
}

Create a free my code stock.com account now.

my code stok.com is a free service, which allows you to save and manage code snippes of any kind and programming language. We provide many advantages for your daily work with code-snippets, also for your teamwork. Give it a try!

Find out more and register now

You can customize the height of iFrame-Codes as needed! You can find more infos in our API Reference for iframe Embeds.