com.simba.dsi.core.utilities
Class AttributeDataMap

java.lang.Object
  extended by com.simba.dsi.core.utilities.AttributeDataMap

public class AttributeDataMap
extends java.lang.Object

Wrapper for Hashtable. The hash is keyed by Integer objects. The values are Variant.


Constructor Summary
AttributeDataMap()
          Constructs an empty AttributeDataMap.
 
Method Summary
 void clear()
          Clear this map.
 boolean contains(int propKey)
          Check if this map contains the input key.
 java.util.Set<java.util.Map.Entry<java.lang.Integer,Variant>> getEntrySet()
          Retrieves a set of entries in this attribute data map.
 java.util.Enumeration<java.lang.Integer> getKeysEnum()
          Retrieves the enumeration of keys.
 java.util.Iterator<java.lang.Integer> getKeysIterator()
          Retrieves an iterator over the keys in this attribute data map.
 Variant getProperty(int key)
          Retrieves the property Variant as specified by the given property key.
 boolean isEmpty()
          Check if the map is empty.
 boolean isProperty(int key)
          Verifies if the AttributeDataMap contains an Variant associated with the given key.
 void setProperty(int key, int valuetype, java.lang.Object value)
          Stores the property in this AttributeDataMap with the key, type, and value as given.
 void setProperty(int key, Variant value)
          Stores the property in this AttributeDataMap with the key and Variant as given.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AttributeDataMap

public AttributeDataMap()
Constructs an empty AttributeDataMap.

Method Detail

getKeysEnum

public java.util.Enumeration<java.lang.Integer> getKeysEnum()
Retrieves the enumeration of keys. Exposed through JNI.

Returns:
enumeration of keys.

getEntrySet

public java.util.Set<java.util.Map.Entry<java.lang.Integer,Variant>> getEntrySet()
Retrieves a set of entries in this attribute data map.

Returns:
Set of entries in this attribute data map.

getKeysIterator

public java.util.Iterator<java.lang.Integer> getKeysIterator()
Retrieves an iterator over the keys in this attribute data map.

Returns:
Iterator over keys in this attribute data map.

getProperty

public Variant getProperty(int key)
Retrieves the property Variant as specified by the given property key. Exposed through JNI.

Parameters:
key - Key which identifies the requested property Variant.
Returns:
The requested property Variant.
See Also:
Variant

isProperty

public boolean isProperty(int key)
Verifies if the AttributeDataMap contains an Variant associated with the given key.

Parameters:
key - Key which identifies the Variant.
Returns:
true if this AttributeDataMap contains the given key; false otherwise.

setProperty

public void setProperty(int key,
                        int valuetype,
                        java.lang.Object value)
                 throws IncorrectTypeException,
                        NumericOverflowException
Stores the property in this AttributeDataMap with the key, type, and value as given.

Parameters:
key - Key which identifies the given Variant.
valuetype - Type of the given Variant.
value - Value of the attribute to be stored in this AttributeDataMap.
Throws:
IncorrectTypeException - If the value and type do not match.
NumericOverflowException - If the user tries to use a UINT32 with a value out of range.

setProperty

public void setProperty(int key,
                        Variant value)
Stores the property in this AttributeDataMap with the key and Variant as given.

Parameters:
key - Key which identifies the given Variant.
value - Attribute data to be stored in this AttributeDataMap.

isEmpty

public boolean isEmpty()
Check if the map is empty.

Returns:
true if the map is empty; false otherwise.

clear

public void clear()
Clear this map.


contains

public boolean contains(int propKey)
Check if this map contains the input key.

Parameters:
propKey - The key to check for.
Returns:
True if the key is in the map; false otherwise.


Copyright © 2006-2014 Simba Technologies Incorporated. All Rights Reserved.