package jp.ac.naka.ec.entity;

import javax.sip.address.Address;


abstract class AbstractEntityContainer implements EntityContainer,
		EntityListener {
	private String location;
	private Address address;
	protected AbstractEntityContainer prev;
	protected AbstractEntityContainer next;

	public abstract void addEntity(Entity e);
	protected abstract void init();
	public Address getAddress() {
		return address;
	}
	public void setAddress(Address address) {
		this.address = address;
	}
	/*
	public String getLocation() {
		return location;
	}*/
	public void setLocation(String location) {
		this.location = location;
	}

	public boolean hasChildContainer() {
		if (next != null) {
			return true;
		} else {
			return false;
		}
	}
	public boolean hasParentContainer() {
		if (prev != null) {
			return true;
		} else {
			return false;
		}
	}

	public void setchildContainer(AbstractEntityContainer next) {
		this.next = next;
	}

	public AbstractEntityContainer getParentContainer() {
		return prev;
	}

	public void setParentContainer(AbstractEntityContainer prev) {
		this.prev = prev;
	}
}
