[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]
Assembly: Db4objects.Db4o (in Db4objects.Db4o.dll)
creates a new database-aware HashMap.
Namespace: Db4objects.Db4o.Types
Assembly: Db4objects.Db4o (in Db4objects.Db4o.dll)
Syntax
Visual Basic (Declaration) |
---|
Function NewHashMap ( _ initialSize As Integer _ ) As IDb4oMap |
C# |
---|
IDb4oMap NewHashMap ( int initialSize ) |
Visual C++ |
---|
IDb4oMap^ NewHashMap ( int initialSize ) |
Parameters
- initialSize
- System.Int32
the initial size of the HashMap
Return Value
Db4objects.Db4o.Types.IDb4oMap
Remarks
creates a new database-aware HashMap.
This map will call the hashCode() method on the key objects to calculate the hash value. Since the hash value is stored to the ObjectContainer, key objects will have to return the same hashCode() value in every VM session.
Usage:
- declare a
variable in your persistent class.
- fill the variable with this method.
Example:
This map will call the hashCode() method on the key objects to calculate the hash value. Since the hash value is stored to the ObjectContainer, key objects will have to return the same hashCode() value in every VM session.
Usage:
- declare a
![]() | |
---|---|
java.util.Map |
- fill the variable with this method.
Example:
![]() | |
---|---|
class MyClass{ Map myMap; } MyClass myObject = new MyClass(); myObject.myMap = objectContainer.ext().collections().newHashMap(0); |