/**
 * TreeGridNode.java  05/26/07
 *
 * @author - Robert Glen Martin
 * @author - School for the Talented and Gifted
 * @author - Dallas ISD
 *
 * Copyright(c) 2007 Robert Glen Martin
 * (http://martin.apluscomputerscience.com/)
 *
 * This code is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation.
 *
 * This code is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 */

import info.gridworld.grid.Location;

public class TreeGridNode<T>
{
	private T occupant;
	private Location loc;
	private TreeGridNode<T> left;
	private TreeGridNode<T> right;

	public TreeGridNode(T occupant, Location loc)
	{
		this.occupant = occupant;
		this.loc = loc;
		this.left = null;
		this.right = null;
	}

	public TreeGridNode(T occupant, Location loc,
		TreeGridNode<T> left, TreeGridNode<T> right)
	{
		this.occupant = occupant;
		this.loc = loc;
		this.left = left;
		this.right = right;
	}

	public T getOccupant()
	{
		return occupant;
	}

	public Location getLocation()
	{
		return loc;
	}

	public TreeGridNode<T> getLeft()
	{
		return left;
	}

	public TreeGridNode<T> getRight()
	{
		return right;
	}

	public void setOccupant(T o)
	{
		occupant = o;
	}

	public void setLocation(Location loc)
	{
		this.loc = loc;
	}

	public void setLeft(TreeGridNode<T> left)
	{
		this.left = left;
	}

	public void setRight(TreeGridNode<T> right)
	{
		this.right = right;
	}
}
