drasys.or.util
Class Metadata

java.lang.Object
  |
  +--drasys.or.util.Metadata

public class Metadata
extends java.lang.Object
implements java.io.Serializable

Metadata container.

See Also:
Serialized Form

Constructor Summary
Metadata()
          Construct an empty container.
Metadata(java.lang.String[] keys, java.lang.String[] values)
          Construct a container initialized to the arguments.
 
Method Summary
 java.lang.String[] get(java.lang.String[] keys, java.lang.String[] defaultValues)
          Get the arguments from the container.
 boolean get(java.lang.String name, boolean defaultValue)
          Get a datum from the container.
 double get(java.lang.String name, double defaultValue)
          Get a datum from the container.
 double get(java.lang.String name, double defaultValue, double min)
          Get a datum from the container with lower bound.
 double get(java.lang.String name, double defaultValue, double min, double max)
          Get a datum from the container with bounds.
 int get(java.lang.String name, int defaultValue)
          Get a datum from the container.
 int get(java.lang.String name, int defaultValue, int min)
          Get a datum from the container with lower bound.
 int get(java.lang.String name, int defaultValue, int min, int max)
          Get a datum from the container with bounds.
 java.lang.String get(java.lang.String key, java.lang.String defaultValue)
          Get a datum from the container.
 boolean isDefined(java.lang.String key)
          Returns true if the metadatum exists.
 java.util.Enumeration keys()
          Return an enumeration on the keys.
 void put(Metadata metadata)
          Put the contents of 'metadata' into the container.
 void put(java.lang.String[] keys, java.lang.String[] values)
          Put the arguments into the container.
 void put(java.lang.String key, java.lang.String value)
          Put a datum into the container.
 void remove(java.lang.String key)
          Remove datum from the container.
 void remove(java.lang.String[] keys)
          Remove data from the container.
 java.lang.String toString()
           
 java.util.Enumeration values()
          Return an enumeration on the values.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Metadata

public Metadata()
Construct an empty container.

Metadata

public Metadata(java.lang.String[] keys,
                java.lang.String[] values)
Construct a container initialized to the arguments.
Method Detail

isDefined

public boolean isDefined(java.lang.String key)
Returns true if the metadatum exists.

keys

public java.util.Enumeration keys()
Return an enumeration on the keys.

values

public java.util.Enumeration values()
Return an enumeration on the values.

remove

public void remove(java.lang.String key)
Remove datum from the container.

remove

public void remove(java.lang.String[] keys)
Remove data from the container.

put

public void put(Metadata metadata)
Put the contents of 'metadata' into the container.

put

public void put(java.lang.String key,
                java.lang.String value)
Put a datum into the container.

get

public java.lang.String get(java.lang.String key,
                            java.lang.String defaultValue)
Get a datum from the container.

put

public void put(java.lang.String[] keys,
                java.lang.String[] values)
Put the arguments into the container.

get

public java.lang.String[] get(java.lang.String[] keys,
                              java.lang.String[] defaultValues)
Get the arguments from the container.

get

public int get(java.lang.String name,
               int defaultValue)
Get a datum from the container.

get

public int get(java.lang.String name,
               int defaultValue,
               int min)
Get a datum from the container with lower bound.

get

public int get(java.lang.String name,
               int defaultValue,
               int min,
               int max)
Get a datum from the container with bounds.

get

public double get(java.lang.String name,
                  double defaultValue)
Get a datum from the container.

get

public double get(java.lang.String name,
                  double defaultValue,
                  double min,
                  double max)
Get a datum from the container with bounds.

get

public double get(java.lang.String name,
                  double defaultValue,
                  double min)
Get a datum from the container with lower bound.

get

public boolean get(java.lang.String name,
                   boolean defaultValue)
Get a datum from the container.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright(C)1997-2000 by DRA Systems all rights reserved. OpsResearch.com