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

joynr.vehicle.RadioStation Maven / Gradle / Ivy

There is a newer version: 1.4.0
Show newest version
		/*
		 *
		 * Copyright (C) 2011 - 2013 BMW Car IT GmbH
		 *
		 * Licensed under the Apache License, Version 2.0 (the "License");
		 * you may not use this file except in compliance with the License.
		 * You may obtain a copy of the License at
		 *
		 *      http://www.apache.org/licenses/LICENSE-2.0
		 *
		 * Unless required by applicable law or agreed to in writing, software
		 * distributed under the License is distributed on an "AS IS" BASIS,
		 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
		 * See the License for the specific language governing permissions and
		 * limitations under the License.
		 */
		
		// #####################################################
		//#######################################################
		//###                                                 ###
		//##    WARNING: This file is generated. DO NOT EDIT   ##
		//##             All changes will be lost!             ##
		//###                                                 ###
		//#######################################################
		// #####################################################
		
package joynr.vehicle;
import java.io.Serializable;

import io.joynr.subtypes.JoynrType;

import joynr.vehicle.Country;

@SuppressWarnings("serial")
// NOTE: serialVersionUID is not defined since we don't support Franca versions right now. 
//       The compiler will generate a serialVersionUID based on the class and its members
//       (cf. http://docs.oracle.com/javase/6/docs/platform/serialization/spec/class.html#4100),
//       which is probably more restrictive than what we want.
public class RadioStation implements Serializable, JoynrType {
	private String name;
	private String station;
	private Country source;
	
	public RadioStation() {
		this.name = "";
		this.station = "";
		this.source = Country.AUSTRALIA;
	}
	

	public RadioStation(
		String name,
		String station,
		Country source
		) {
		this.name = name;
		this.station = station;
		this.source = source;
	}
	

	public String getName() {
		return this.name;
	}
	
	public void setName(String name) {
		this.name = name;
	}
	
	public String getStation() {
		return this.station;
	}
	
	public void setStation(String station) {
		this.station = station;
	}
	
	public Country getSource() {
		return this.source;
	}
	
	public void setSource(Country source) {
		this.source = source;
	}
	
	
	@Override
	public String toString() {
		return "RadioStation ["
		+ "name=" + this.name + ", "
		+ "station=" + this.station + ", "
		+ "source=" + this.source
		+ "]";
	}
	
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		RadioStation other = (RadioStation) obj;
		if (this.name == null) {
			if (other.name != null) {
				return false;
			}
		} else if (!this.name.equals(other.name)){
			return false;
		}
		if (this.station == null) {
			if (other.station != null) {
				return false;
			}
		} else if (!this.station.equals(other.station)){
			return false;
		}
		if (this.source == null) {
			if (other.source != null) {
				return false;
			}
		} else if (!this.source.equals(other.source)){
			return false;
		}
		return true;
	}
	
	@Override
	public int hashCode() {
		int result = 1;
		final int prime = 31;
		result = prime * result + ((this.name == null) ? 0 : this.name.hashCode());
		result = prime * result + ((this.station == null) ? 0 : this.station.hashCode());
		result = prime * result + ((this.source == null) ? 0 : this.source.hashCode());
		return result;
	}
}

	




© 2015 - 2025 Weber Informatics LLC | Privacy Policy