java.lang.Object
com.port80.util.attr.AttrTable
com.port80.graph.impl.DirectedVertexFactory
- All Implemented Interfaces:
- com.port80.util.attr.IAttrTable, com.port80.graph.IGraphElementFactory, com.port80.graph.IVertexFactory
- public class DirectedVertexFactory
- extends com.port80.util.attr.AttrTable
- implements com.port80.graph.IVertexFactory
Factory class that produce vertex for directed graph. The factory
also holds default attributes for vertices and IAttrRegistry interface for
client to check for unqiue attribute names.
|
Method Summary |
void |
clearAttrs()
Remove all local attributes. |
com.port80.graph.IVertex |
newVertex(java.lang.String name,
java.lang.Object data,
com.port80.graph.IGraph parent)
|
com.port80.graph.IVertex |
newVertex(java.lang.String name,
java.lang.String port,
java.lang.Object data,
com.port80.graph.IGraph parent)
|
java.lang.Object |
removeAttr(java.lang.String name)
Remove a local attribute. |
void |
removeUnregistered()
|
java.lang.Object |
setAttr(java.lang.String name,
boolean value)
|
java.lang.Object |
setAttr(java.lang.String name,
double value)
|
java.lang.Object |
setAttr(java.lang.String name,
float value)
|
java.lang.Object |
setAttr(java.lang.String name,
int value)
|
java.lang.Object |
setAttr(java.lang.String name,
long value)
|
java.lang.Object |
setAttr(java.lang.String name,
java.lang.Object value)
Set local attribute. |
java.lang.Object |
setAttrFromString(java.lang.String name,
double value)
|
java.lang.Object |
setAttrFromString(java.lang.String name,
java.lang.String value)
Factory tables are read only. |
| Methods inherited from class com.port80.util.attr.AttrTable |
attrKeySet, getAttr, getAttrAsString, getAttrBool, getAttrBool, getAttrCached, getAttrDouble, getAttrDouble, getAttrFloat, getAttrFloat, getAttrInt, getAttrInt, getAttrLong, getAttrLong, getAttrRegistry, getAttrString, hasAttr, initAttr, initAttr, initAttr, initAttr, initAttr, initAttr, initAttr, initAttr, removeUnregisteredAttrs |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.port80.util.attr.IAttrTable |
attrKeySet, getAttr, getAttrAsString, getAttrBool, getAttrBool, getAttrCached, getAttrDouble, getAttrDouble, getAttrFloat, getAttrFloat, getAttrInt, getAttrInt, getAttrLong, getAttrLong, getAttrString, hasAttr, removeUnregisteredAttrs |
NAME
private static final java.lang.String NAME
- See Also:
- Constant Field Values
DirectedVertexFactory
public DirectedVertexFactory()
setAttrFromString
public java.lang.Object setAttrFromString(java.lang.String name,
java.lang.String value)
- Factory tables are read only. Override setAttr methods to warn user.
- Specified by:
setAttrFromString in interface com.port80.util.attr.IAttrTable
setAttr
public java.lang.Object setAttr(java.lang.String name,
java.lang.Object value)
- Description copied from interface:
com.port80.util.attr.IAttrTable
- Set local attribute.
- Specified by:
setAttr in interface com.port80.util.attr.IAttrTable
setAttr
public java.lang.Object setAttr(java.lang.String name,
boolean value)
- Specified by:
setAttr in interface com.port80.util.attr.IAttrTable
setAttr
public java.lang.Object setAttr(java.lang.String name,
int value)
- Specified by:
setAttr in interface com.port80.util.attr.IAttrTable
setAttr
public java.lang.Object setAttr(java.lang.String name,
long value)
- Specified by:
setAttr in interface com.port80.util.attr.IAttrTable
setAttr
public java.lang.Object setAttr(java.lang.String name,
float value)
- Specified by:
setAttr in interface com.port80.util.attr.IAttrTable
setAttr
public java.lang.Object setAttr(java.lang.String name,
double value)
- Specified by:
setAttr in interface com.port80.util.attr.IAttrTable
setAttrFromString
public java.lang.Object setAttrFromString(java.lang.String name,
double value)
removeAttr
public java.lang.Object removeAttr(java.lang.String name)
- Description copied from interface:
com.port80.util.attr.IAttrTable
- Remove a local attribute. @return attribute removed.
- Specified by:
removeAttr in interface com.port80.util.attr.IAttrTable
removeUnregistered
public void removeUnregistered()
clearAttrs
public void clearAttrs()
- Description copied from interface:
com.port80.util.attr.IAttrTable
- Remove all local attributes.
- Specified by:
clearAttrs in interface com.port80.util.attr.IAttrTable
newVertex
public com.port80.graph.IVertex newVertex(java.lang.String name,
java.lang.Object data,
com.port80.graph.IGraph parent)
throws com.port80.graph.GraphException
- Specified by:
newVertex in interface com.port80.graph.IVertexFactory
newVertex
public com.port80.graph.IVertex newVertex(java.lang.String name,
java.lang.String port,
java.lang.Object data,
com.port80.graph.IGraph parent)
throws com.port80.graph.GraphException
- Specified by:
newVertex in interface com.port80.graph.IVertexFactory