Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  package jadex.bdi.planlib.watchdog;
  
The observation description
  
  public class ObservationDescription
 {
 	//-------- attributes --------
 
The identifier of the component to observe.
 
 	protected IComponentIdentifier cid;

The delay between pings.
 
 	protected long pingdelay;

The contact data.
 
 	protected ContactData[] contacts;
 
 	//-------- constructors --------
 
Create a new description.
 
 	{
 	}

Create a new description.
 
 	public ObservationDescription(IComponentIdentifier cidlong pingdelayContactData[] contact)
 	{
 		this. = cid;
 		this. = pingdelay;
 		this. = (ContactData[])contact.clone();
 	}
 
 	//-------- methods --------
 
Get the component id.

Returns:
The component id;
 
 	{
 		return ;
 	}

Set the component id.

Parameters:
cid The component id;
 
 	{
 		this. = cid;
 	}

Get the ping delay.

Returns:
The ping delay.
 
 	public long getPingDelay()
 	{
 		return ;
 	}

Set the ping delay.

Parameters:
pingdelay The ping delay.
 
 	public void setPingDelay(long pingdelay)
 	{
 		this. = pingdelay;
 	}

Get the contact data.

Returns:
The contact data.
 
 	public ContactData[] getContacts()
 	{
 		return ;
 	}

Set the contact data.

Parameters:
contacts The contact data.
 
 	public void setContacts(ContactData[] contacts)
 	{
 		this. = (ContactData[])contacts.clone();
 	}

Returns a string representation of the object. In general, the toString method returns a string that "textually represents" this object. The result should be a concise but informative representation that is easy for a person to read. It is recommended that all subclasses override this method.

The toString method for class Object returns a string consisting of the name of the class of which the object is an instance, the at-sign character `@', and the unsigned hexadecimal representation of the hash code of the object. In other words, this method returns a string equal to the value of:

 getClass().getName() + '@' + Integer.toHexString(hashCode())
 

Returns:
a string representation of the object.
	public String toString()
	{
		StringBuffer sb = new StringBuffer();
		sb.append("(");
		sb.append(", ");
		sb.append(", ");
		sb.append(")");
		return sb.toString();
	}
New to GrepCode? Check out our FAQ X