HOME

com.ireasoning.util
Class Syntax

java.lang.Object
  extended bycom.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
 Syntax copy()
          Makes a copy of itself
 String get(String key)
          Returns the string value.
 String getDerivedType()
           
 String getDisplayHint()
           
 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 setDerivedType(String t)
           
 void setDisplayHint(String hint)
           
 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

copy

public Syntax copy()
Makes a copy of itself


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


setDerivedType

public void setDerivedType(String t)

getDerivedType

public String getDerivedType()
Returns:
the data type.

getDisplayHint

public String getDisplayHint()
Returns:
the value of DisplayHint clause

setDisplayHint

public void setDisplayHint(String hint)

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.


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.