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

## com.sun.appserv.management.j2ee.statistics
Class MapStatisticImpl

    java.lang.Object
      com.sun.appserv.management.j2ee.statistics.MapStatisticImpl

All Implemented Interfaces:
  MapStatistic, java.io.Serializable, Statistic

Direct Known Subclasses:
  CompositeDataStatistic

public class MapStatisticImpl
extends java.lang.Object
implements MapStatistic, java.io.Serializable

Generic implementation of Statistic which contains its members in a Map.

See Also:
  Serialized Form

Constructor Summary
`MapStatisticImpl(java.util.Map map)`
`MapStatisticImpl(Statistic statistic)`

Method Summary
`java.util.Map` | `asMap()`
`boolean` | `equals(java.lang.Object rhs)`
`java.lang.String` | `getDescription()` Get the description for this Statistic
`int` | `getint(java.lang.String name)` Get a Statistic value which is expected to be an Integer (int)
`long` | `getLastSampleTime()` Get the last sample time for this Statistic
`long` | `getlong(java.lang.String name)` Get a Statistic value which is expected to be a Long (long)
`java.lang.String` | `getName()` Get the name of this Statistic
`long` | `getStartTime()` Get the start time for this Statistic
`java.lang.String` | `getString(java.lang.String name)` Get a Statistic value which is expected to be a String
`java.lang.String` | `getUnit()` Get the units associated with this statistic.
`java.lang.Object` | `getValue(java.lang.String name)` Get a Statistic value which is expected to be any Object
`java.lang.String` | `setName(java.lang.String newName)` Get the name of this Statistic
`java.lang.String` | `toString()`
`java.util.Set` | `valueNames()` Get the fields associated with this statistic.

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

Constructor Detail

### MapStatisticImpl

    public MapStatisticImpl(java.util.Map map)

### MapStatisticImpl

    public MapStatisticImpl(Statistic statistic)

Method Detail

### getlong

    public final long getlong(java.lang.String name)

  Get a Statistic value which is expected to be a Long (long)

  Specified by:
    `getlong` in interface `MapStatistic`

### getint

    public final int getint(java.lang.String name)

  Get a Statistic value which is expected to be an Integer (int)

  Specified by:
    `getint` in interface `MapStatistic`

### getString

    public final java.lang.String getString(java.lang.String name)

  Get a Statistic value which is expected to be a String

  Specified by:
    `getString` in interface `MapStatistic`

### getValue

    public final java.lang.Object getValue(java.lang.String name)

  Get a Statistic value which is expected to be any Object

  Specified by:
    `getValue` in interface `MapStatistic`

### getDescription

    public java.lang.String getDescription()

  Get the description for this Statistic

  Specified by:
    `getDescription` in interface `Statistic`

### getLastSampleTime

    public long getLastSampleTime()

  Get the last sample time for this Statistic

  Specified by:
    `getLastSampleTime` in interface `Statistic`

### getName

    public java.lang.String getName()

  Get the name of this Statistic

  Specified by:
    `getName` in interface `Statistic`

### setName

    public java.lang.String setName(java.lang.String newName)

  Get the name of this Statistic

  Specified by:
    `setName` in interface `MapStatistic`

### getStartTime

    public long getStartTime()

  Get the start time for this Statistic

  Specified by:
    `getStartTime` in interface `Statistic`

### getUnit

    public java.lang.String getUnit()

  Get the units associated with this statistic.

  Specified by:
    `getUnit` in interface `Statistic`

### valueNames

    public java.util.Set valueNames()

  Get the fields associated with this statistic. Note the name--"get" is avoided so it won't be introspected as another Statistic field.

  Specified by:
    `valueNames` in interface `MapStatistic`
  Returns:
    an unmodifiableSet of the field names (String)

### asMap

    public java.util.Map asMap()

  Specified by:
    `asMap` in interface `MapStatistic`

### toString

    public java.lang.String toString()

  Specified by:
    `toString` in interface `MapStatistic`

### equals

    public boolean equals(java.lang.Object rhs)

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

Submit a bug or feature

Copyright 2003 Sun Microsystems, Inc. All rights reserved.