Class RecordMap


  • public final class RecordMap
    extends Object
    Provides a mapping interface over records by defined key fields. A RecordMap is built by invoking one of the newRecordMap methods. These methods load the data cache from the record port and index the loaded records by the key fields.

    Once loaded, the map can be accessed via an iterator. The iterator can be synchronized with another data source. As the secondary data source is stepped, the record map iterator can then seek to the records in the cache matching the current key fields of the secondary input.

    • Field Detail

      • DEFAULT_CAPACITY

        public static final int DEFAULT_CAPACITY
        Default initial capacity value
        See Also:
        Constant Field Values
    • Method Detail

      • getType

        public RecordTokenType getType()
        Get the token type of the cached data.
        Returns:
        token type of the cached data
      • getKeyType

        public RecordTokenType getKeyType()
        Returns the token type of the keys of the map.
        Returns:
        the token type of the keys of the map.
      • newIterator

        public RecordMap.RecordMapIterator newIterator​(RecordValued value)
        Create a RecordMap.RecordMapIterator that is able to reference key values in the given record valued data source. As the given data source is stepped, the iterator must be queried using the seek method for the source's current key value.
        Parameters:
        value - record valued data source
        Returns:
        iterator over values in the record map matching the current key value in the data source
      • newEntryIterator

        public RecordValuedIterator newEntryIterator()
        Create a RecordValuedIterator over the entries in this map. This iterator will indexed by entry number.
        Returns:
        an iterator over records in the map
      • entryCount

        public int entryCount()
        Returns the number of entries in the map
        Returns:
        the number of records stored