src/org/sonews/feed/Subscription.java
changeset 37 74139325d305
parent 35 ed84c8bdd87b
     1.1 --- a/src/org/sonews/feed/Subscription.java	Sun Aug 29 17:43:58 2010 +0200
     1.2 +++ b/src/org/sonews/feed/Subscription.java	Sun Aug 29 18:17:37 2010 +0200
     1.3 @@ -24,61 +24,57 @@
     1.4   * @author Christian Lins
     1.5   * @since sonews/0.5.0
     1.6   */
     1.7 -public class Subscription 
     1.8 +public class Subscription
     1.9  {
    1.10  
    1.11 -  private String host;
    1.12 -  private int    port;
    1.13 -  private int    feedtype;
    1.14 -  private String group;
    1.15 -  
    1.16 -  public Subscription(String host, int port, int feedtype, String group)
    1.17 -  {
    1.18 -    this.host     = host;
    1.19 -    this.port     = port;
    1.20 -    this.feedtype = feedtype;
    1.21 -    this.group    = group;
    1.22 -  }
    1.23 +	private String host;
    1.24 +	private int port;
    1.25 +	private int feedtype;
    1.26 +	private String group;
    1.27  
    1.28 -  @Override
    1.29 -  public boolean equals(Object obj)
    1.30 -  {
    1.31 -    if(obj instanceof Subscription)
    1.32 -    {
    1.33 -      Subscription sub = (Subscription)obj;
    1.34 -      return sub.host.equals(host) && sub.group.equals(group) 
    1.35 -        && sub.port == port && sub.feedtype == feedtype;
    1.36 -    }
    1.37 -    else
    1.38 -    {
    1.39 -      return false;
    1.40 -    }
    1.41 -  }
    1.42 +	public Subscription(String host, int port, int feedtype, String group)
    1.43 +	{
    1.44 +		this.host = host;
    1.45 +		this.port = port;
    1.46 +		this.feedtype = feedtype;
    1.47 +		this.group = group;
    1.48 +	}
    1.49  
    1.50 -  @Override
    1.51 -  public int hashCode()
    1.52 -  {
    1.53 -    return host.hashCode() + port + feedtype + group.hashCode();
    1.54 -  }
    1.55 +	@Override
    1.56 +	public boolean equals(Object obj)
    1.57 +	{
    1.58 +		if (obj instanceof Subscription) {
    1.59 +			Subscription sub = (Subscription) obj;
    1.60 +			return sub.host.equals(host) && sub.group.equals(group)
    1.61 +				&& sub.port == port && sub.feedtype == feedtype;
    1.62 +		} else {
    1.63 +			return false;
    1.64 +		}
    1.65 +	}
    1.66  
    1.67 -  public int getFeedtype()
    1.68 -  {
    1.69 -    return feedtype;
    1.70 -  }
    1.71 +	@Override
    1.72 +	public int hashCode()
    1.73 +	{
    1.74 +		return host.hashCode() + port + feedtype + group.hashCode();
    1.75 +	}
    1.76  
    1.77 -  public String getGroup()
    1.78 -  {
    1.79 -    return group;
    1.80 -  }
    1.81 +	public int getFeedtype()
    1.82 +	{
    1.83 +		return feedtype;
    1.84 +	}
    1.85  
    1.86 -  public String getHost()
    1.87 -  {
    1.88 -    return host;
    1.89 -  }
    1.90 +	public String getGroup()
    1.91 +	{
    1.92 +		return group;
    1.93 +	}
    1.94  
    1.95 -  public int getPort()
    1.96 -  {
    1.97 -    return port;
    1.98 -  }
    1.99 -  
   1.100 +	public String getHost()
   1.101 +	{
   1.102 +		return host;
   1.103 +	}
   1.104 +
   1.105 +	public int getPort()
   1.106 +	{
   1.107 +		return port;
   1.108 +	}
   1.109  }