Adding any AtomicVal to any ItemList staticly.

@param pRtx
as key
@param pVal
to be added
@return the index in the ItemList
769479
public static int addAtomicToItemList(final INodeReadTrx pRtx, final AtomicValue pVal) {
        if (!atomics.containsKey(pRtx)) {
            atomics.put(pRtx, new ItemList());
        }
        return atomics.get(pRtx).addItem(pVal);

    }
303312
@Override
    public R visitIndex(IndexTree node, P p) {
        return defaultAction(node, p);
    }
1346350
public int addItem(final AtomicValue pItem) {
        final int key = mList.size();
        pItem.setNodeKey(key);
        // TODO: +2 is necessary, because key -1 is the NULLDATA
        final int itemKey = (key + 2) * (-1);
        pItem.setNodeKey(itemKey);

        mList.add(pItem);
        return itemKey;
    }
1365901
@JsonIgnore
    @SuppressWarnings("unchecked")
    public List<HalRepresentation> getItemsBy(final String rel) {
        if (!hasItem(rel)) {
            return emptyList();
        } else {
            final Object item = items.get(curies.resolve(rel));
            return item instanceof List
                    ? (List<HalRepresentation>) item
                    : singletonList((HalRepresentation) item);
        }
    }
11934
public RandomVariable getProcessValue(int timeIndex, int componentIndex)
	{
		if(timeIndex == 0) {
			return getInitialValue()[componentIndex];
		}

		// Lazy initialization, synchronized for thread safety
		synchronized(this) {
			if(discreteProcess == null || discreteProcess.length == 0) {
				doPrecalculateProcess();
			}
		}

		// Return value of process
		return discreteProcess[timeIndex][componentIndex];
	}
787252
public static Integer getInteger(int pValue) {
        if (pValue >= INTEGER_LOWER_BOUND &&
                pValue <= INTEGER_UPPER_BOUND) {
            return mIntegers[((int) pValue) - INTEGER_LOWER_BOUND];
        } else {
            return new Integer(pValue);
        }
    }
957816
public final V set(int index, V value) {
    int size = this.size;
    if (index < 0 || index >= size) {
      throw new IndexOutOfBoundsException();
    }
    int valueDataIndex = 1 + (index << 1);
    V result = valueAtDataIndex(valueDataIndex);
    this.data[valueDataIndex] = value;
    return result;
  }
52982
public com.google.iam.v1.BindingDelta getBindingDeltas(int index) {
    return bindingDeltas_.get(index);
  }
1261527
@SafeVarargs
    public final FastAdapterBottomSheetDialog<Item> add(int position, Item... items) {
        mItemAdapter.add(position, items);
        return this;
    }
938432
public synchronized ComboBox<V> addItem(V item) {
        if(item == null) {
            throw new IllegalArgumentException("Cannot add null elements to a ComboBox");
        }
        items.add(item);
        if(selectedIndex == -1 && items.size() == 1) {
            setSelectedIndex(0);
        }
        invalidate();
        return this;
    }
573616
public T argMax() {
        double maxCount = -Double.MAX_VALUE;
        T maxKey = null;
        for (Map.Entry<T, AtomicDouble> entry : map.entrySet()) {
            if (entry.getValue().get() > maxCount || maxKey == null) {
                maxKey = entry.getKey();
                maxCount = entry.getValue().get();
            }
        }
        return maxKey;
    }
174151
public RandomVariableInterface[] getProcessValue(int timeIndex)
	{
		// Thread safe lazy initialization
		synchronized(this) {
			if(discreteProcess == null || discreteProcess.length == 0)
			{
				doPrecalculateProcess();
			}
		}

		// Return value of process
		return discreteProcess[timeIndex];
	}
1288648
public final String prn(final Map<String, Object> pAddParam,
    final BigDecimal pVal) {
    return this.srvNumberToString.print(pVal.toString(),
      (String) pAddParam.get("decSepv"),
        (String) pAddParam.get("decGrSepv"),
          (Integer) pAddParam.get("reportDp"),
            (Integer) pAddParam.get("digInGr"));
  }
667821
def map_prop_value_as_index(prp, lst):
    
    return from_pairs(map(lambda item: (prop(prp, item), item), lst))
26587
public AtomicValue<Integer>       next() throws Exception
    {
        MutableAtomicValue<Integer> result = new MutableAtomicValue<Integer>(0, 0);

        if ( currentValue == null )
        {
            currentValue = number.add(cacheFactor);
            if ( !currentValue.succeeded() )
            {
                currentValue = null;
                result.succeeded = false;
                return result;
            }
            currentIndex = 0;
        }

        result.succeeded = true;
        result.preValue = currentValue.preValue() + currentIndex;
        result.postValue = result.preValue + 1;

        if ( ++currentIndex >= cacheFactor )
        {
            currentValue = null;
        }

        return result;
    }
469285
public void setNextInteger(final int pValue, final int pLength) {

		if (pLength > Integer.SIZE) {
			throw new IllegalArgumentException("Integer overflow with length > 32");
		}

		setNextValue(pValue, pLength, Integer.SIZE - 1);
	}
1142806
public AtomicValue getItem(final long pKey) {
        assert pKey <= Integer.MAX_VALUE;

        int index = (int)pKey; // cast to integer, because the list only
                               // accepts int

        if (index < 0) {
            index = index * (-1);
        }

        // TODO: This is necessary, because key -1 is the NULLDATA
        index = index - 2;

        return mList.get(index);
    }