// Phone.java

package hr;

public class Phone implements java.io.Serializable
{

    private String phoneNo;
    private String phoneType;

    public Phone(String phoneNo, String phoneType)
    {
	this.phoneNo = phoneNo;
	this.phoneType = phoneType;
    }

    public String getPhoneNo() {
	return phoneNo;
    }

    public void setPhoneNo(String phoneNo) {
	this.phoneNo = phoneNo;
    }

    public String getPhoneType() {
	return phoneType;
    }

    public void setPhoneType(String phoneType) {
	this.phoneType = phoneType;
    }

    public String getPhone() {
	return phoneNo + " " + phoneType;
    }

    public boolean equals(Object other)
    {
        if(other instanceof Phone) {
            Phone phone = (Phone)other;
            if (phone.equals(phone.getPhone())) {
                return true;
            }
        }
        return false;
    }

}
