fi.helsinki.dacopan.model
Class Host

java.lang.Object
  extended by fi.helsinki.dacopan.model.Host
All Implemented Interfaces:
Identifiable

public class Host
extends java.lang.Object
implements Identifiable

A host present in a scenario.

Version:
$Id: Host.java,v 1.7 2004/05/07 09:19:42 aarniala-dacopan Exp $

Field Summary
protected  java.lang.String hostname
          hostname
protected  long id
          unique id of the host
protected  java.lang.String ip
          ip address
protected  java.util.List staticVariables
          list of static variables associated with this host
 
Constructor Summary
Host(long id, java.lang.String ip, java.lang.String hostname)
          Creates a host with the given id, ip (required) and hostname.
Host(long id, java.lang.String ip, java.lang.String hostname, java.util.List staticVariables)
          Creates a host with the given values and static variables.
 
Method Summary
 boolean equals(java.lang.Object o)
           
 java.lang.String getHostname()
          Returns the hostname of the host (may be null).
 long getId()
          Returns the unique identifier of this object.
 java.lang.String getIp()
          Returns the ip address of the host (guaranteed to be non-null).
 java.util.List getStaticVariables()
          Returns a List of ALL StaticVariables the host has in the scenario.
 int hashCode()
           
 void setStaticVariables(java.util.List staticVariables)
          Sets the static variables for this host.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

id

protected long id
unique id of the host


ip

protected java.lang.String ip
ip address


hostname

protected java.lang.String hostname
hostname


staticVariables

protected java.util.List staticVariables
list of static variables associated with this host

Constructor Detail

Host

public Host(long id,
            java.lang.String ip,
            java.lang.String hostname)
Creates a host with the given id, ip (required) and hostname.


Host

public Host(long id,
            java.lang.String ip,
            java.lang.String hostname,
            java.util.List staticVariables)
Creates a host with the given values and static variables.

Method Detail

getId

public long getId()
Description copied from interface: Identifiable
Returns the unique identifier of this object.

Specified by:
getId in interface Identifiable
Returns:
a unique long id

getHostname

public java.lang.String getHostname()
Returns the hostname of the host (may be null).


getIp

public java.lang.String getIp()
Returns the ip address of the host (guaranteed to be non-null).


getStaticVariables

public java.util.List getStaticVariables()
Returns a List of ALL StaticVariables the host has in the scenario. In case there will be several types of static variables, the StaticVariable class will provide specific methods for more details about the static variable.

Returns:
non-null list of static variables

setStaticVariables

public void setStaticVariables(java.util.List staticVariables)
Sets the static variables for this host.


equals

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

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


© Dacopan2 team, 2005-