Builds the functional interface implementation and if previously provided calls the consumer.
343025
@Nonnull
	public final IntConsumer build() {

		final IntConsumer eventuallyFinal = this.eventually;

		IntConsumer retval;

		final Case<LIntPredicate, IntConsumer>[] casesArray = cases.toArray(new Case[cases.size()]);
		retval = Function4U.intCons(a -> {
			try {
				for (Case<LIntPredicate, IntConsumer> aCase : casesArray) {
					if (aCase.casePredicate().test(a)) {
						aCase.caseFunction().accept(a);
						return;
					}
				}

				eventuallyFinal.accept(a);
			} catch (Error e) { // NOSONAR
					throw e;
				} catch (Throwable e) { // NOSONAR
					throw Handler.handleOrPropagate(e, handling);
				}
			});

		if (consumer != null) {
			consumer.accept(retval);
		}
		return retval;
	}
113171
public void buildForMerge() {
        Preconditions.checkState(!isBuilt, "Tree already built");
        root.mergeExistingAndProposed(items, targetInvoiceId);
        isBuilt = true;
        isMerged = true;
    }
403942
@Nonnull
	public final DoubleFunction<R> build() {

		final DoubleFunction<R> eventuallyFinal = this.eventually;

		DoubleFunction<R> retval;

		final Case<LDblPredicate, DoubleFunction<R>>[] casesArray = cases.toArray(new Case[cases.size()]);
		retval = Function4U.<R> dblFunc(a -> {
			try {
				for (Case<LDblPredicate, DoubleFunction<R>> aCase : casesArray) {
					if (aCase.casePredicate().test(a)) {
						return aCase.caseFunction().apply(a);
					}
				}

				return eventuallyFinal.apply(a);
			} catch (Error e) { // NOSONAR
					throw e;
				} catch (Throwable e) { // NOSONAR
					throw Handler.handleOrPropagate(e, handling);
				}
			});

		if (consumer != null) {
			consumer.accept(retval);
		}
		return retval;
	}
816466
function build() {
    // Start creating the body of the new Type constructor, first calling super()
    var _ret = buildIdentity.call(this);
    var typeId = _ret.typeId;
    var typeName = _ret.typeName;
    var body =
        '\tvar opts = options ? options : {};\n' +
        '\tthis.constructor.util._extend(this, opts.props);\n' +
        '\tthis.constructor.super_.call(this, opts.buffer, opts.offset' +
        (typeId ? '' : ', true') +
        ');\n';
    // Init fields
    body += _ret.body;
    body += buildSerialize.call(this);
    body += buildDeserialize.call(this);
    // Add to body all the read/write methods
    for (var i = 0; i < this._methods.length; i++) {
        body += this._methods[i];
    }
    if (logger.isDebugEnabled()) {
        logger.debug('Body for %s type constructor:', typeName);
        logger.debug('\n' + body);
    }
    return createConstructor(body, typeId, typeName);
}
136370
protected function build()
    {
        if ($this->beforeExecute) {
            call_user_func($this->beforeExecute, $this);
        }
        if ($this->bodyEntity !== null) {
            if ($this->pendingRequest instanceof EntityEnclosingRequestInterface) {
                $this->pendingRequest->setBody(
                    $this->serializer->serialize($this->bodyEntity, $this->requestFormat),
                    $this->requestContentType
                );
            } else {
                throw new \LogicException(
                    'Request must implement EntityEnclosingRequestInterface when command has body'
                );
            }
        }
        if ($this->accessToken !== null) {
            $this->pendingRequest->getParams()->set('oauth_commerce.token', $this->accessToken);
        }
        $this->request = $this->pendingRequest;
    }
282684
@Nonnull
	public final LBiBoolFunction<R> build() {

		final LBiBoolFunction<R> eventuallyFinal = this.eventually;

		LBiBoolFunction<R> retval;

		final Case<LLogicalBinaryOperator, LBiBoolFunction<R>>[] casesArray = cases.toArray(new Case[cases.size()]);
		retval = LBiBoolFunction.<R> biBoolFunc((a1, a2) -> {
			try {
				for (Case<LLogicalBinaryOperator, LBiBoolFunction<R>> aCase : casesArray) {
					if (aCase.casePredicate().apply(a1, a2)) {
						return aCase.caseFunction().apply(a1, a2);
					}
				}

				return eventuallyFinal.apply(a1, a2);
			} catch (Error e) { // NOSONAR
					throw e;
				} catch (Throwable e) { // NOSONAR
					throw Handler.handleOrPropagate(e, handling);
				}
			});

		if (consumer != null) {
			consumer.accept(retval);
		}
		return retval;
	}
7481
@Nonnull
	public static LBoolSupplier boolSupplierFrom(Consumer<LBoolSupplierBuilder> buildingFunction) {
		LBoolSupplierBuilder builder = new LBoolSupplierBuilder();
		buildingFunction.accept(builder);
		return builder.build();
	}
378430
@Nonnull
	public static <T, R> LObjIntSrtFunctionBuilder<T, R> objIntSrtFunction(Consumer<LObjIntSrtFunction<T, R>> consumer) {
		return new LObjIntSrtFunctionBuilder(consumer);
	}
1290560
@Nonnull
	public static Runnable actionFrom(Consumer<RunnableBuilder> buildingFunction) {
		RunnableBuilder builder = new RunnableBuilder();
		buildingFunction.accept(builder);
		return builder.build();
	}
388329
@Nonnull
	public static <R> LFltFunction<R> fltFunctionFrom(Consumer<LFltFunctionBuilder<R>> buildingFunction) {
		LFltFunctionBuilder builder = new LFltFunctionBuilder();
		buildingFunction.accept(builder);
		return builder.build();
	}
1126492
FunctionType buildAndRegister() {
    if (returnType == null) {
      provideDefaultReturnType();
      checkNotNull(returnType);
    }

    if (parametersNode == null) {
      throw new IllegalStateException(
          "All Function types must have params and a return type");
    }

    FunctionType fnType;
    if (isConstructor) {
      fnType = getOrCreateConstructor();
    } else if (isInterface) {
      fnType = getOrCreateInterface();
    } else {
      fnType =
          FunctionType.builder(typeRegistry)
              .withName(fnName)
              .withSourceNode(contents.getSourceNode())
              .withParamsNode(parametersNode)
              .withReturnType(returnType, returnTypeInferred)
              .withTypeOfThis(thisType)
              .withTemplateKeys(templateTypeNames)
              .withIsAbstract(isAbstract)
              .withClosurePrimitiveId(closurePrimitiveId)
              .build();
      maybeSetBaseType(fnType);
    }

    if (implementedInterfaces != null && fnType.isConstructor()) {
      fnType.setImplementedInterfaces(implementedInterfaces);
    }

    if (extendedInterfaces != null) {
      fnType.setExtendedInterfaces(extendedInterfaces);
    }

    if (isRecord) {
      fnType.setImplicitMatch(true);
    }

    return fnType;
  }
277728
@Nonnull
	public static <T1, T2> LToIntBiFunctionBuilder<T1, T2> toIntBiFunction(Consumer<LToIntBiFunction<T1, T2>> consumer) {
		return new LToIntBiFunctionBuilder(consumer);
	}
480051
public JSType build() {
    if (result == null) {
      result = reduceAlternatesWithoutUnion();
      if (result == null) {
        result = new UnionType(registry, ImmutableList.copyOf(getAlternates()));
      }
    }
    return result;
  }
627771
public final void build(GraphIterator<ST, PT> iterator, SubGraphBuildListener<ST, PT> listener) {
		assert iterator != null;
		final Set<ComparableWeakReference<PT>> reachedPoints = new TreeSet<>();
		GraphIterationElement<ST, PT> element;
		ST segment;
		PT point;
		PT firstPoint = null;

		this.parentGraph = new WeakReference<>(iterator.getGraph());
		this.segments.clear();
		this.pointNumber = 0;
		this.terminalPoints.clear();

		while (iterator.hasNext()) {
			element = iterator.nextElement();
			point = element.getPoint();
			segment = element.getSegment();

			// First reached segment
			if (this.segments.isEmpty()) {
				firstPoint = point;
			}

			this.segments.add(segment);
			if (listener != null) {
				listener.segmentAdded(this, element);
			}

			// Register terminal points
			point = segment.getOtherSidePoint(point);
			final ComparableWeakReference<PT> ref = new ComparableWeakReference<>(point);
			if (element.isTerminalSegment()) {
				if (!reachedPoints.contains(ref)) {
					this.terminalPoints.add(ref);
					if (listener != null) {
						listener.terminalPointReached(this, point, segment);
					}
				}
			} else {
				this.terminalPoints.remove(ref);
				reachedPoints.add(ref);
				if (listener != null) {
					listener.nonTerminalPointReached(this, point, segment);
				}
			}
		}

		if (firstPoint != null) {
			final ComparableWeakReference<PT> ref = new ComparableWeakReference<>(firstPoint);
			if (!reachedPoints.contains(ref)) {
				this.terminalPoints.add(ref);
			}
		}

		this.pointNumber = this.terminalPoints.size() + reachedPoints.size();

		reachedPoints.clear();
	}
1096181
@Nonnull
	public static LFltSupplier fltSupplierFrom(Consumer<LFltSupplierBuilder> buildingFunction) {
		LFltSupplierBuilder builder = new LFltSupplierBuilder();
		buildingFunction.accept(builder);
		return builder.build();
	}
879521
@Nonnull
	public static <T1, T2, R> LObjIntObjFunctionBuilder<T1, T2, R> objIntObjFunction(Consumer<LObjIntObjFunction<T1, T2, R>> consumer) {
		return new LObjIntObjFunctionBuilder(consumer);
	}
1190637
@Nonnull
	public static <T> LTieIntFunctionBuilder<T> tieIntFunction(Consumer<LTieIntFunction<T>> consumer) {
		return new LTieIntFunctionBuilder(consumer);
	}