HOME

com.ireasoning.util
Class Syntax

java.lang.Object
  |
  +--com.ireasoning.util.Syntax
All Implemented Interfaces:
Serializable

public class Syntax
extends Object
implements Serializable

This class represents the SYNTAX clause of a MIB node

See Also:
Serialized Form

Constructor Summary
Syntax()
           
 
Method Summary
 String get(String key)
          Returns the string value.
 String getSize()
          Returns the size range.
 Hashtable getSyntaxMap()
          Returns a map which maps key (usually numeric value) to value.
 String getSyntaxString()
          Returns the syntax string (the syntax clause without syntax type).
 String getType()
          Returns the syntax type.
 void setSyntaxString(String s)
           
 void setType(String type)
          Sets syntax type
 String toString()
          Returns the SYNTAX clause.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Syntax

public Syntax()
Method Detail

getType

public String getType()
Returns the syntax type. For instance, for syntax "SYNTAX INTEGER { up(1), down(2), testing(3)}", this method returns INTEGER.

setType

public void setType(String type)
Sets syntax type

getSyntaxString

public String getSyntaxString()
Returns the syntax string (the syntax clause without syntax type). For instance, for syntax "SYNTAX INTEGER { up(1), down(2), testing(3)}", this method returns "INTEGER { up(1), down(2), testing(3)}"

setSyntaxString

public void setSyntaxString(String s)

getSize

public String getSize()
Returns the size range. For instance, for syntax "DisplayString (SIZE (0..32))", it returns "SIZE (0.32)"

toString

public String toString()
Returns the SYNTAX clause. Returns null if no SYNTAX clause present.
Overrides:
toString in class Object

get

public String get(String key)
Returns the string value. For example, for syntax "SYNTAX INTEGER { up(1), down(2), testing(3)}", passed String "1" will return "up"

getSyntaxMap

public Hashtable getSyntaxMap()
Returns a map which maps key (usually numeric value) to value. For instance, for syntax: "SYNTAX INTEGER { up(1), down(2), testing(3)}", the returned map keys are 1, 2, 3, and their corresponding values are up, down, testing.

HOME

Copyright © 2002 iReasoning Inc. All Rights Reserved.