jas.graph
Class RelationalAgent
java.lang.Object
jas.graph.RelationalAgent
- All Implemented Interfaces:
- IRelationalAgent
public class RelationalAgent
- extends java.lang.Object
- implements IRelationalAgent
The default implementation of the IRelationalAgent interface.
Title: JAS
Description: Java Agent-based Simulation library
Copyright (C) 2002 Michele Sonnessa
This library is free software; you can redistribute it and/or modify it under the terms
of the GNU Lesser General Public License as published by the Free Software Foundation;
either version 2.1 of the License, or (at your option) any later version.
This library 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 Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this
library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
Boston, MA 02111-1307, USA.
- Author:
- Riccardo Boero
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
RelationalAgent
public RelationalAgent(org._3pq.jgrapht.Graph g)
- Parameters:
color
-
RelationalAgent
public RelationalAgent(org._3pq.jgrapht.Graph g,
int id)
addRelation
public org._3pq.jgrapht.Edge addRelation(IRelationalAgent a,
double w)
- Specified by:
addRelation
in interface IRelationalAgent
deltaRelation
public org._3pq.jgrapht.Edge deltaRelation(IRelationalAgent a,
double delta)
getAttribute
public java.lang.Object getAttribute(java.lang.Object key)
getAttributes
public java.util.Map getAttributes()
- Specified by:
getAttributes
in interface IRelationalAgent
getColor
public java.awt.Color getColor()
- Specified by:
getColor
in interface IRelationalAgent
getGraph
public org._3pq.jgrapht.Graph getGraph()
- Specified by:
getGraph
in interface IRelationalAgent
getId
public int getId()
- Specified by:
getId
in interface IRelationalAgent
getIncidentEdges
public java.util.Set getIncidentEdges()
- Specified by:
getIncidentEdges
in interface IRelationalAgent
getIncidentInEdges
public java.util.Set getIncidentInEdges()
- Specified by:
getIncidentInEdges
in interface IRelationalAgent
getIncidentOutEdges
public java.util.Set getIncidentOutEdges()
- Specified by:
getIncidentOutEdges
in interface IRelationalAgent
getLabel
public java.lang.String getLabel()
- Specified by:
getLabel
in interface IRelationalAgent
getRelation
public org._3pq.jgrapht.Edge getRelation(IRelationalAgent agent)
- Specified by:
getRelation
in interface IRelationalAgent
getShape
public int getShape()
- Specified by:
getShape
in interface IRelationalAgent
getSize
public int getSize()
- Specified by:
getSize
in interface IRelationalAgent
getWeightKey
public java.lang.String getWeightKey()
getX
public int getX()
- Specified by:
getX
in interface IRelationalAgent
getY
public int getY()
- Specified by:
getY
in interface IRelationalAgent
putAttribute
public void putAttribute(java.lang.Object key,
java.lang.Object value)
removeRelation
public org._3pq.jgrapht.Edge removeRelation(IRelationalAgent a)
- Specified by:
removeRelation
in interface IRelationalAgent
setColor
public void setColor(java.awt.Color color)
- Specified by:
setColor
in interface IRelationalAgent
- Parameters:
color
-
setLabel
public void setLabel(java.lang.String string)
- Specified by:
setLabel
in interface IRelationalAgent
- Parameters:
string
-
setShape
public void setShape(int i)
- Specified by:
setShape
in interface IRelationalAgent
- Parameters:
i
-
setSize
public void setSize(int i)
- Specified by:
setSize
in interface IRelationalAgent
- Parameters:
i
-
setXY
public void setXY(int x,
int y)
- Specified by:
setXY
in interface IRelationalAgent
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object