@Override public boolean execute(String activityName, long latestExecutionTime) { runningExecutionTotals.adjustOrPutValue(activityName, latestExecutionTime, latestExecutionTime); latestSpike = spikeData.get(activityName); if (latestExecutionTime > latestSpike) { spikeData.put(activityName, latestExecutionTime); } return true; } }
public static byte getSides(Set<Side> sides) { byte result = 0; for (Side side : sides) { result += sideBits.get(side); } return result; }
@Override public boolean execute(String activityName, long latestAllocatedMemory) { runningAllocationTotals.adjustOrPutValue(activityName, latestAllocatedMemory, latestAllocatedMemory); return true; } }
/** * @param id The previously set id of the field * @return The field identified by the given id, or null if there is no such field */ public FIELD getField(int id) { return fieldsById.get(id); }
private List<MethodLocation> getTargets(int branchFromAddress, TIntIntMap targetKeyToOffset) { int[] offsets = targetKeyToOffset.values(); List<MethodLocation> targets = new LinkedList<>(); for (int offset : offsets) { int targetOffset = branchFromAddress + offset; targets.add(addressToLocation.get(targetOffset)); } return targets; } }
@Override public final synchronized long getCounter(String task) { return taskCounters.get(task); }
private int getActiveShaderProgramId() { return disposalAction.shaderPrograms.get(activeFeaturesMask); }
@Override public boolean execute(String activityName, double executionTime) { spikeData.put(activityName, executionTime * DECAY_RATE); return true; } }
long getEntityId(int netId) { return netIdToEntityId.get(netId); }
public void unregisterClientNetworkEntity(int netId) { netIdToEntityId.remove(netId); }
@Override public boolean execute(String activityName, long expiredAllocatedMemory) { runningAllocationTotals.adjustValue(activityName, -expiredAllocatedMemory); return true; } }
/** * @return An iterable of the registered blocks */ @Override public Iterable<Block> getBlocks() { return blocks.valueCollection(); } }
public static ViewDistance forIndex(int viewDistanceLevel) { ViewDistance result = indexLookup.get(viewDistanceLevel); if (result == null) { return LEGALLY_BLIND; } return result; }
@Override public boolean execute(String activityName, long total) { if (total > 0) { activityToMeanMap.put(activityName, total * factor); } return true; } }
public static byte addSide(byte sideBit, Side... sides) { byte result = sideBit; for (Side side : sides) { result |= sideBits.get(side); } return result; }
@Override public boolean execute(String activityName, long expiredExecutionTime) { runningExecutionTotals.adjustValue(activityName, -expiredExecutionTime); return true; } }
/** * Returns only unique rotations, in respect to transformations, rather than in respect to yaw, pitch & roll. * * @return Unique rotations, in respect to transformations. */ public static Iterable<Rotation> values() { return NORMALIZED_ROTATIONS.valueCollection(); } }
public MethodLocation getLocation(int address) { return addressToLocation.get(address); }
public static boolean hasSide(byte sideBit, Side side) { return (sideBit & sideBits.get(side)) > 0; }