laser.dotgraph
Class DotAttribute

java.lang.Object
  extended by laser.dotgraph.DotAttribute

public class DotAttribute
extends java.lang.Object

The DotAttribute class represents an attribute of a dot graph element represented as a name-value pair.

Author:
Heather M. Conboy (laser-software@cs.umass.edu)

Constructor Summary
DotAttribute(java.lang.String name, boolean value)
          Creates a new DotAttribute with the given name and boolean value.
DotAttribute(java.lang.String name, int value)
          Creates a new DotAttribute with the given name and int value.
DotAttribute(java.lang.String name, java.lang.String value)
          Creates a new DotAttribute with the given name and String value.
 
Method Summary
static DotAttribute createDotColorAttribute(java.lang.String color)
          Creates a new DotAttribute that represents the color.
static DotAttribute createDotLabelAttribute(java.lang.String label)
          Creates a new DotAttribute that represents the label.
static DotAttribute createDotShapeAttribute(java.lang.String shape)
          Creates a new DotAttribute that represents the shape.
static DotAttribute createDotStyleAttribute(java.lang.String style)
          Creates a new DotAttribute that represents the style.
 java.lang.String getName()
          Returns the name of this DotAttribute.
 java.lang.String getValue()
          Returns the value of this DotAttribute.
 java.lang.String toString()
          Returns a String representation of this DotAttribute.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DotAttribute

public DotAttribute(java.lang.String name,
                    java.lang.String value)
Creates a new DotAttribute with the given name and String value.

PRECONDITIONS: The name and value must be non-null.

Parameters:
name - The name
value - The String value

DotAttribute

public DotAttribute(java.lang.String name,
                    boolean value)
Creates a new DotAttribute with the given name and boolean value.

PRECONDITION: The name must be non-null.

Parameters:
name - The name
value - The boolean value

DotAttribute

public DotAttribute(java.lang.String name,
                    int value)
Creates a new DotAttribute with the given name and int value.

PRECONDITION: The name must be non-null.

Parameters:
name - The name
value - The int value
Method Detail

getName

public java.lang.String getName()
Returns the name of this DotAttribute.

Returns:
The name

getValue

public java.lang.String getValue()
Returns the value of this DotAttribute.

Returns:
The value

toString

public java.lang.String toString()
Returns a String representation of this DotAttribute.

Overrides:
toString in class java.lang.Object
Returns:
A String representation of this Object

createDotColorAttribute

public static final DotAttribute createDotColorAttribute(java.lang.String color)
Creates a new DotAttribute that represents the color.

Parameters:
color - The value
Returns:
A new DotAttribute that represents the color

createDotLabelAttribute

public static final DotAttribute createDotLabelAttribute(java.lang.String label)
Creates a new DotAttribute that represents the label.

Parameters:
label - The value
Returns:
A new DotAttribute that represents the label

createDotShapeAttribute

public static final DotAttribute createDotShapeAttribute(java.lang.String shape)
Creates a new DotAttribute that represents the shape.

Parameters:
shape - The value
Returns:
A new DotAttribute that represents the shape

createDotStyleAttribute

public static final DotAttribute createDotStyleAttribute(java.lang.String style)
Creates a new DotAttribute that represents the style.

Parameters:
style - The value
Returns:
A new DotAttribute that represents the style