de.scheisseichfindemalkeinen.queue
Class QueueCounter

java.lang.Object
  extended by de.scheisseichfindemalkeinen.queue.QueueCounter
All Implemented Interfaces:
java.lang.Comparable

public class QueueCounter
extends java.lang.Object
implements java.lang.Comparable

This class is a counter for a domain. The counter stores the count of connections which are open to a domain. This is needed for the restrictions.

See Also:
Restriction, QueueData

Constructor Summary
QueueCounter(java.lang.String domain)
          Constructor
 
Method Summary
 int compareTo(java.lang.Object o)
           
 boolean equals(java.lang.Object obj)
           
 int getCount()
          Returns the count of simultanious downloads for this domain
 java.lang.String getDomain()
          Returns the domain There is no Set-Method for Domain because, the domain should not change
 void setCount(int count)
          Sets the count of simultanious downloads for this domain
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QueueCounter

public QueueCounter(java.lang.String domain)
Constructor

Parameters:
domain - Domain
Method Detail

getDomain

public java.lang.String getDomain()
Returns the domain There is no Set-Method for Domain because, the domain should not change

Returns:
Domain

getCount

public int getCount()
Returns the count of simultanious downloads for this domain

Returns:
the count Count

setCount

public void setCount(int count)
Sets the count of simultanious downloads for this domain

Parameters:
count - Count

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

compareTo

public int compareTo(java.lang.Object o)
Specified by:
compareTo in interface java.lang.Comparable