@Override public short firstShort() { return sortedSet.firstShort(); } @Override
@Override public short firstShort() { synchronized (sync) { return sortedSet.firstShort(); } } @Override
/** * {@inheritDoc} * * @deprecated Please use the corresponding type-specific method instead. */ @Deprecated @Override default Short first() { return Short.valueOf(firstShort()); } /**
public int addType(final Object label) { checkType(label); short id = labelMap.getShort(label); if (id == NULL_SHORT) { if (!garbageQueue.isEmpty()) { id = garbageQueue.firstShort(); garbageQueue.remove(id); } else { id = intToShort(length); if (length >= MAX_SIZE) { throw new RuntimeException("Maximum number of edge types reached at " + MAX_SIZE); } length++; } labelMap.put(label, id); idMap.put(id, label); } return shortToInt(id); }
public int addType(final Object label) { checkType(label); short id = labelMap.getShort(label); if (id == NULL_SHORT) { if (!garbageQueue.isEmpty()) { id = garbageQueue.firstShort(); garbageQueue.remove(id); } else { id = intToShort(length); if (length >= MAX_SIZE) { throw new RuntimeException("Maximum number of edge types reached at " + MAX_SIZE); } length++; } labelMap.put(label, id); idMap.put(id, label); } return shortToInt(id); }
if (id == NULL_SHORT) { if (!garbageQueue.isEmpty()) { id = garbageQueue.firstShort(); garbageQueue.remove(id); } else {
if (id == NULL_SHORT) { if (!garbageQueue.isEmpty()) { id = garbageQueue.firstShort(); garbageQueue.remove(id); } else {