@Override public long distance(BigInteger start, BigInteger end) { return end.subtract(start).max(MIN_LONG).min(MAX_LONG).longValue(); }
@Override public long distance(BigInteger start, BigInteger end) { return end.subtract(start).max(MIN_LONG).min(MAX_LONG).longValue(); }
@Override public long distance(BigInteger start, BigInteger end) { return end.subtract(start).max(MIN_LONG).min(MAX_LONG).longValue(); }
@Override public long distance(BigInteger start, BigInteger end) { return end.subtract(start).max(MIN_LONG).min(MAX_LONG).longValue(); }
@Override public void value(BigInteger each) { this.count++; if (each != null) { this.sum = this.sum.add(each); this.min = this.min == null ? each : this.min.min(each); this.max = this.max == null ? each : this.max.max(each); } }
@Override public void value(BigInteger each) { this.count++; if (each != null) { this.sum = this.sum.add(each); this.min = this.min == null ? each : this.min.min(each); this.max = this.max == null ? each : this.max.max(each); } }
public BigIntegerSummaryStatistics merge(BigIntegerSummaryStatistics summaryStatistics) { this.count += summaryStatistics.count; this.sum = this.sum.add(summaryStatistics.sum); if (summaryStatistics.min != null) { this.min = this.min == null ? summaryStatistics.min : this.min.min(summaryStatistics.min); } if (summaryStatistics.max != null) { this.max = this.max == null ? summaryStatistics.max : this.max.max(summaryStatistics.max); } return this; } }
public BigIntegerSummaryStatistics merge(BigIntegerSummaryStatistics summaryStatistics) { this.count += summaryStatistics.count; this.sum = this.sum.add(summaryStatistics.sum); if (summaryStatistics.min != null) { this.min = this.min == null ? summaryStatistics.min : this.min.min(summaryStatistics.min); } if (summaryStatistics.max != null) { this.max = this.max == null ? summaryStatistics.max : this.max.max(summaryStatistics.max); } return this; } }
@Override public BigInteger visitBinaryFunction(BinaryFunctionContext ctx) { BigInteger left = visit(ctx.left); BigInteger right = visit(ctx.right); switch (ctx.binaryFunctionName().name.getType()) { case MIN: return left.min(right); case MAX: return left.max(right); default: throw new IllegalArgumentException("Unsupported binary function " + ctx.binaryFunctionName().getText()); } }
@Override BigInteger apply(BigInteger left, BigInteger right) { return left.max(right); } }
BigInteger in = memNeeded(stack.get(stack.size() - opOff), stack.get(stack.size() - opOff - 1)); // in offset+size BigInteger out = memNeeded(stack.get(stack.size() - opOff - 2), stack.get(stack.size() - opOff - 3)); // out offset+size gasCost += calcMemGas(gasCosts, oldMemSize, in.max(out), 0);
BigInteger estShardSizeInBytes = BigInteger.valueOf(avgShardSizeInBytes).max(totFreeSpace.divide(BigInteger.valueOf(20)));
BigInteger combine(BigInteger orig, BigInteger copy, BigInteger other) { if (this == ADD) { return copy == null && orig == null ? null : safeBigInt(copy).add(safeBigInt(orig)); } else if (this == MAX) { return copy == null && orig == null ? null : safeBigInt(copy).max(safeBigInt(orig)); } else if (this == MIN) { return copy == null && orig == null ? null : safeBigInt(copy).max(safeBigInt(orig)); } else if (this == ADD_OTHER) { return copy == null && orig == null && other == null ? null : safeBigInt(copy).add(safeBigInt(orig).add(safeBigInt(other))); } else if (this == MAX_OTHER) { return copy == null && orig == null && other == null ? null : safeBigInt(copy).max(safeBigInt(orig).max(safeBigInt(other))); } else if (this == MIN_OTHER) { return copy == null && orig == null && other == null ? null : safeBigInt(copy).min(safeBigInt(orig).min(safeBigInt(other))); } else if (this == RANGE) { return copy == null && orig == null && other == null ? null : safeBigInt(copy).max(safeBigInt(orig).min(safeBigInt(other))); } else { return copy; } } }
@Override public void addBlankLines(final int count) { if (count > 0) { // now add empty for spacing PPr pPr = myFactory.createPPr(); myBlockFormatProvider.getPPr(pPr); PPr explicitPPr = myDocxHelper.getExplicitPPr(pPr); final ParaRPr rPr = explicitPPr.getRPr(); BigInteger size = rPr.getSz().getVal().max(rPr.getSzCs().getVal()); addBlankLine(size.multiply(BigInteger.valueOf(count)), null); } }
if (maxOccurs != null) maxOccurs = (from.getMaxOccurs() == null ? null : maxOccurs.max(from.getMaxOccurs()));
child.getInd().setLeft(ZERO.max(safeIndLeft(cInd).subtract(BigInteger.valueOf(remainder))));
@Override public void value(BigInteger each) { this.count++; if (each != null) { this.sum = this.sum.add(each); this.min = this.min == null ? each : this.min.min(each); this.max = this.max == null ? each : this.max.max(each); } }
@Override public long distance(BigInteger start, BigInteger end) { return end .subtract(start) .max(MIN_LONG) .min(MAX_LONG) .longValue(); }
private static BigInteger clamp( final BigInteger minValue, final BigInteger maxValue, final BigInteger value) { return value.max(minValue).min(maxValue); }