public class Zone extends java.lang.Object implements java.lang.Iterable<Resource>
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_ZONE_ID |
static java.lang.String |
defaultZoneName |
Modifier | Constructor and Description |
---|---|
protected |
Zone(int zoneId,
Network parent)
The constructor of the current class.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
containsResource(Resource resource) |
int |
getId()
A function to get the zoneId of the zone.
|
java.lang.String |
getName()
A function to get the name of the zone.
|
Network |
getParent()
A function to get the parent Network of the zone.
|
java.util.Set<Resource> |
getResources()
A function to get the set of resources of the current zone.
|
int |
hashCode() |
protected void |
internalAddResource(Resource resource) |
protected void |
internalMarkAsReady() |
protected void |
internalRemoveResource(Resource resource) |
protected void |
internalSetName(java.lang.String name) |
protected void |
internalSetParent(Network parent) |
boolean |
isReady()
A function suggesting if the zone is made from
NativeCallbacks.zoneInfoCallback(boolean, java.lang.String, int, java.lang.String, long[], java.lang.String[], java.lang.String[], java.lang.Object)
or because of state retrieval. |
java.util.Iterator<Resource> |
iterator() |
void |
setName(java.lang.String name,
Network.NetworkManagementStatusListener listener)
A function to set the name of the current zone.
|
java.lang.String |
toString() |
public static java.lang.String defaultZoneName
public static final int DEFAULT_ZONE_ID
protected Zone(int zoneId, Network parent)
zoneId
- The unique id of the zoneparent
- The parent network of the zonepublic int getId()
public java.lang.String getName()
public java.util.Set<Resource> getResources()
public Network getParent()
public void setName(java.lang.String name, Network.NetworkManagementStatusListener listener)
name
- The name that has to be setprotected void internalAddResource(Resource resource)
protected void internalRemoveResource(Resource resource)
protected boolean containsResource(Resource resource)
protected void internalSetName(java.lang.String name)
protected void internalMarkAsReady()
protected void internalSetParent(Network parent)
public final int hashCode()
hashCode
in class java.lang.Object
public boolean isReady()
NativeCallbacks.zoneInfoCallback(boolean, java.lang.String, int, java.lang.String, long[], java.lang.String[], java.lang.String[], java.lang.Object)
or because of state retrieval.public java.util.Iterator<Resource> iterator()
iterator
in interface java.lang.Iterable<Resource>
public java.lang.String toString()
toString
in class java.lang.Object