Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  package com.savvasdalkitsis.jtmdb;
  
  import java.net.URL;
  
This class represents a Country.

Author(s):
Savvas Dalkitsis
 
 public class Country implements Serializable {
 
 	private static final long serialVersionUID = 5337925489671786943L;

The url of the Country.
 
 	private URL url;
The name of the Country.
 
 	private String name;
The code of the Country;
 
 	private String code;

Constructs a Country with the given URL, name and code.

Parameters:
url The URL of the Country.
name The name of the Country.
code The code of the Country.
 
 	public Country(URL urlString nameString code) {
 		Log.log("Creating Country object with url: "
 				+ ((url == null) ? "NULL" : url.toString()) + ", code: " + code
 				+ " and name: " + name.);
 		setUrl(url);
 		setName(name);
 		setCode(code);
 	}
 
 	public boolean equals(Object obj) {
 		if (obj == this) {
 			return true;
 		}
 		if (obj instanceof Country) {
 			return ((Countryobj).getCode().equals(getCode());
 		}
 		return false;
 	}
 
 	public int hashCode() {
 		return getName().hashCode();
 	}

The URL of the Country.

Returns:
The URL of the Country.
 
 	public URL getUrl() {
 		return ;
 	}

Sets the URL of the Country.

Parameters:
url The URL of the Country.
 
 	public void setUrl(URL url) {
 		this. = url;
 	}

The name of the Country.

Returns:
The name of the Country.
 
 	public String getName() {
 		return ;
 	}

Sets the name of the Country.

Parameters:
name The name of the Country.
 
	public void setName(String name) {
		this. = name;
	}

The code of the Country.

Returns:
The code of the Country.
	public String getCode() {
		return ;
	}

Sets the code of the Country.

Parameters:
code The code of the Country.
	public void setCode(String code) {
		this. = code;
	}
New to GrepCode? Check out our FAQ X