jigcell.compare.data
Class ResultSetMap

java.lang.Object
  extended by jigcell.compare.data.ResultSetMap
All Implemented Interfaces:
IDataGeneratorCollection, IResultSetMap

public class ResultSetMap
extends java.lang.Object
implements IResultSetMap

Manages a map of results.

This code is licensed under the DARPA BioCOMP Open Source License. See LICENSE for more details.

Author:
Nicholas Allen

Nested Class Summary
protected static class ResultSetMap.ResultSetMapDelegate
          Persists the mapping by using a series of put statements.
 
Nested classes/interfaces inherited from interface jigcell.compare.data.IDataGeneratorCollection
IDataGeneratorCollection.Key
 
Field Summary
protected  java.util.Map map
          Internal Map[Key,IDataElement] implementation
 
Constructor Summary
ResultSetMap()
          Creates a new map between names and results.
ResultSetMap(int size, float load)
          Creates a new map between names and results.
 
Method Summary
 java.lang.Object clone()
           
static IResultSetMap createMap(java.lang.Object map)
          Converts a collection to a map of results.
 IDataElement get(IDataGeneratorCollection.Key key)
          The result associated with a particular key or null if there is no such mapping.
 java.util.Iterator iterator()
          An iterator over the entries of this map.
 java.util.Set keySet()
          All of the keys in this map.
 IDataElement put(IDataGeneratorCollection.Key key, IDataElement result)
          Adds a mapping between a key and result.
 IDataElement put(IDataGeneratorCollection.Key key, java.lang.String result)
          Adds a mapping between a key and result.
 IDataElement put(java.lang.String name, java.lang.String id, IDataElement result)
          Adds a mapping between a name, id, and result.
 IDataElement put(java.lang.String name, java.lang.String id, java.lang.String result)
          Adds a mapping between a name, id, and result.
 void putAll(java.util.Map map)
          Adds all the entries from the map to this map.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

map

protected java.util.Map map
Internal Map[Key,IDataElement] implementation

Constructor Detail

ResultSetMap

public ResultSetMap()
Creates a new map between names and results.


ResultSetMap

public ResultSetMap(int size,
                    float load)
Creates a new map between names and results.

Parameters:
size - Initial size
load - Load factor
Method Detail

createMap

public static IResultSetMap createMap(java.lang.Object map)
Converts a collection to a map of results. If the input is already the correct type, it may be returned unchanged.

Parameters:
map - Map

clone

public java.lang.Object clone()
Specified by:
clone in interface IDataGeneratorCollection
Overrides:
clone in class java.lang.Object

get

public IDataElement get(IDataGeneratorCollection.Key key)
The result associated with a particular key or null if there is no such mapping.

Specified by:
get in interface IResultSetMap
Parameters:
key - Key

iterator

public java.util.Iterator iterator()
An iterator over the entries of this map.

Specified by:
iterator in interface IResultSetMap

keySet

public java.util.Set keySet()
All of the keys in this map.

Specified by:
keySet in interface IResultSetMap

put

public IDataElement put(IDataGeneratorCollection.Key key,
                        IDataElement result)
Adds a mapping between a key and result.

Specified by:
put in interface IResultSetMap
Parameters:
key - Key
result - Generator result

put

public IDataElement put(IDataGeneratorCollection.Key key,
                        java.lang.String result)
Adds a mapping between a key and result.

Specified by:
put in interface IResultSetMap
Parameters:
key - Key
result - Generator result

put

public IDataElement put(java.lang.String name,
                        java.lang.String id,
                        IDataElement result)
Adds a mapping between a name, id, and result.

Specified by:
put in interface IResultSetMap
Parameters:
name - Name
id - Id
result - Generator result

put

public IDataElement put(java.lang.String name,
                        java.lang.String id,
                        java.lang.String result)
Adds a mapping between a name, id, and result.

Specified by:
put in interface IResultSetMap
Parameters:
name - Name
id - Id
result - Generator result

putAll

public void putAll(java.util.Map map)
Adds all the entries from the map to this map.

Specified by:
putAll in interface IResultSetMap
Parameters:
map - Map