Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## edu.uci.ics.jung.graph.decorators
Class NumericDecorator

    java.lang.Object
      edu.uci.ics.jung.graph.decorators.Decorator
          edu.uci.ics.jung.graph.decorators.NumericDecorator

public class NumericDecorator
extends Decorator

Decorator for any value type that extends the java.lang.Number class

Author:
  Scott White

Constructor Summary
`NumericDecorator(Object key, UserDataContainer.CopyAction copyAction)` Constructs and initializes the decorator

Method Summary
`Number` | `getValue(UserDataContainer udc)` Returns the decorated value as Number
`int` | `intValue(UserDataContainer udc)` Retrieves the decorated value for the given graph/vertex/edge as an integer
`void` | `setValue(Number value, UserDataContainer udc)` Sets the value for a given graph/vertex/edge

Methods inherited from class edu.uci.ics.jung.graph.decorators.Decorator
`getCopyAction, getKey, hashCode, removeValue`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### NumericDecorator

    public NumericDecorator(Object key,
                            UserDataContainer.CopyAction copyAction)

  Constructs and initializes the decorator

Parameters:
  `key` -
  `copyAction` -

Method Detail

### intValue

    public int intValue(UserDataContainer udc)

  Retrieves the decorated value for the given graph/vertex/edge as an integer

  Parameters:
    `udc` - the graph/vertex/edge
  Returns:
    the integer value

### getValue

    public Number getValue(UserDataContainer udc)

  Returns the decorated value as Number

  Parameters:
    `udc` - the graph/vertex/edge
  Returns:
    the value

### setValue

    public void setValue(Number value,
                         UserDataContainer udc)

  Sets the value for a given graph/vertex/edge

  Parameters:
    `value` - the value to be stored
    `udc` - the graph/vertex/edge being decorated

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD