コード例 #1
0
        internal static IntObjectMap <PropertyBlock> Properties(IList <PropertyBlock> propertyBlocks)
        {
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final org.eclipse.collections.api.map.primitive.MutableIntObjectMap<org.neo4j.kernel.impl.store.record.PropertyBlock> propertyIds = new org.eclipse.collections.impl.map.mutable.primitive.IntObjectHashMap<>();
            MutableIntObjectMap <PropertyBlock> propertyIds = new IntObjectHashMap <PropertyBlock>();

            foreach (PropertyBlock propertyBlock in propertyBlocks)
            {
                propertyIds.put(propertyBlock.KeyIndexId, propertyBlock);
            }
            return(propertyIds);
        }
コード例 #2
0
        private static System.Func <int, RawCursor <Hit <LabelScanKey, LabelScanValue>, IOException> > Store(params Labels[] labels)
        {
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final org.eclipse.collections.api.map.primitive.MutableIntObjectMap<Labels> labelsMap = new org.eclipse.collections.impl.map.mutable.primitive.IntObjectHashMap<>(labels.length);
            MutableIntObjectMap <Labels> labelsMap = new IntObjectHashMap <Labels>(labels.Length);

            foreach (Labels item in labels)
            {
                labelsMap.put(item.LabelId, item);
            }

            return(labelId =>
            {
                Labels item = labelsMap.get(labelId);
                return item != null?item.Cursor() : EMPTY_CURSOR;
            });
        }