JADE_SL.abs
Class AbsObjectImpl

java.lang.Object
  extended byJADE_SL.abs.AbsObjectImpl
All Implemented Interfaces:
AbsObject
Direct Known Subclasses:
AbsIRE, AbsPrimitiveSlotsHolder, AbsVariable

public class AbsObjectImpl
extends java.lang.Object
implements AbsObject

Base class for all abstract descriptor classes.

Author:
Federico Bergenti - Universita` di Parma

Field Summary
private  java.util.Hashtable elements
           
private  java.lang.String typeName
           
 
Constructor Summary
protected AbsObjectImpl(java.lang.String typeName)
          Construct an Abstract descriptor to hold an object of the proper type.
 
Method Summary
 void dump()
           
protected  void dump(int indent, java.io.PrintStream ps)
           
 AbsObject getAbsObject(java.lang.String name)
          Gets the value of an attribute of the object held by this abstract descriptor.
 int getCount()
          Gets the number of attributes.
 java.util.Enumeration getNameEnumeration()
           
 java.lang.String[] getNames()
           
 java.lang.String getTypeName()
           
 boolean isGrounded()
          Tests if the object is grounded, i.e., if no one of its attributes is associated with a variable
protected  void set(java.lang.String name, AbsObject value)
          Sets an attribute of the object held by this abstract descriptor.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

elements

private java.util.Hashtable elements

typeName

private java.lang.String typeName
Constructor Detail

AbsObjectImpl

protected AbsObjectImpl(java.lang.String typeName)
Construct an Abstract descriptor to hold an object of the proper type.

Parameters:
typeName - The name of the type of the object held by this abstract descriptor.
Method Detail

getTypeName

public java.lang.String getTypeName()
Specified by:
getTypeName in interface AbsObject
Returns:
The name of the type of the object held by this abstract descriptor.
See Also:
AbsObject.getTypeName()

set

protected void set(java.lang.String name,
                   AbsObject value)
Sets an attribute of the object held by this abstract descriptor.

Parameters:
name - The name of the attribute to be set.
value - The new value of the attribute. If value is null the current mapping with name (if any) is removed.

getAbsObject

public AbsObject getAbsObject(java.lang.String name)
Gets the value of an attribute of the object held by this abstract descriptor.

Specified by:
getAbsObject in interface AbsObject
Parameters:
name - The name of the attribute.
Returns:
value The value of the attribute.
See Also:
AbsObject#getAbsObject()

getNames

public java.lang.String[] getNames()
Specified by:
getNames in interface AbsObject
Returns:
the name of all attributes.
See Also:
AbsObject.getNames()

getNameEnumeration

public java.util.Enumeration getNameEnumeration()

isGrounded

public boolean isGrounded()
Tests if the object is grounded, i.e., if no one of its attributes is associated with a variable

Specified by:
isGrounded in interface AbsObject
Returns:
true if the object is grounded.
See Also:
AbsObject.isGrounded()

getCount

public int getCount()
Gets the number of attributes.

Specified by:
getCount in interface AbsObject
Returns:
the number of attributes.
See Also:
AbsObject.getCount()

dump

protected void dump(int indent,
                    java.io.PrintStream ps)

dump

public void dump()
Specified by:
dump in interface AbsObject
See Also:
AbsObject.dump()

toString

public java.lang.String toString()


Copyright © 2000-2003 BT Exact Technologies. All Rights Reserved.