Returns the proto builder object for this feature factor. Recursively constructs protos for all the concat
vectors in factorTable.

@return proto Builder object
178137
public ConcatVectorTableProto.ConcatVectorTable.Builder getProtoBuilder() {
        ConcatVectorTableProto.ConcatVectorTable.Builder b = ConcatVectorTableProto.ConcatVectorTable.newBuilder();
        for (int n : getDimensions()) {
            b.addDimensionSize(n);
        }
        for (int[] assignment : this) {
            b.addFactorTable(getAssignmentValue(assignment).get().getProtoBuilder());
        }
        return b;
    }
58580
public ParametricFactorGraphEnsemble build() {
    return new ParametricFactorGraphEnsemble(
        new DynamicFactorGraph(variables, constantFactors, constantFactorNames),
        parametricFactors, factorPatterns, baseFactors, IndexedList.create(parametricFactorNames));
  }
207964
public function getConfigTreeBuilder()
    {
        $treeBuilder = new TreeBuilder();
        $rootNode = $treeBuilder->root('sidus_eav_model');
        /** @var NodeBuilder $attributeDefinition */
        $attributeDefinition = $rootNode
            ->children()
                ->scalarNode('data_class')->isRequired()->end()
                ->scalarNode('value_class')->isRequired()->end()
                ->booleanNode('serializer_enabled')->defaultFalse()->end()
                ->scalarNode('collection_type')->defaultValue(CollectionType::class)->end()
                ->scalarNode('context_form_type')->defaultNull()->end()
                ->variableNode('default_context')->defaultValue([])->end()
                ->arrayNode('global_context_mask')
                    ->prototype('scalar')->defaultValue([])->end()
                ->end()
                ->arrayNode('attributes')
                    ->useAttributeAsKey('code')
                    ->prototype('array')
                        ->performNoDeepMerging()
                        ->cannotBeOverwritten()
                        ->children();

        $this->appendAttributeDefinition($attributeDefinition);

        /** @var NodeBuilder $familyDefinition */
        $familyDefinition = $attributeDefinition
                        ->end()
                    ->end()
                ->end()
                ->arrayNode('families')
                    ->useAttributeAsKey('code')
                    ->prototype('array')
                        ->performNoDeepMerging()
                        ->cannotBeOverwritten()
                        ->children();

        $this->appendFamilyDefinition($familyDefinition);

        $familyDefinition
                        ->end()
                    ->end()
                ->end()
            ->end();

        return $treeBuilder;
    }
1252079
public FacesConfigComponentType<FacesConfigType<T>> getOrCreateComponent()
   {
      List<Node> nodeList = childNode.get("component");
      if (nodeList != null &&  nodeList.size() > 0)
      {
         return new FacesConfigComponentTypeImpl<FacesConfigType<T>>(this, "component", childNode, nodeList.get(0));
      }
      return createComponent();
   }
874541
protected FactoryBuilderSupport getProxyBuilder() {
        FactoryBuilderSupport proxy = localProxyBuilder.get();
        if (proxy == null) {
            return globalProxyBuilder;
        } else {
            return proxy;
        }
    }
634730
public GraphicalModel compileModel() {
    GraphicalModel compiled = new GraphicalModel();
    for (GraphicalModel.Factor factor : model.factors) {
      compiled.addStaticFactor(factor.neigborIndices, factor.getDimensions(),
          assign -> factor.getAssignmentValue(assign, weights));
    }

    // Add any metadata
    for (int var = 0; var < model.numVariables(); ++var) {
      Map<String, String> metadata = model.getVariableMetaDataByReference(var);
      if (metadata.containsKey(VARIABLE_OBSERVED_VALUE)) {
        compiled.getVariableMetaDataByReference(var).put(VARIABLE_OBSERVED_VALUE, metadata.get(VARIABLE_OBSERVED_VALUE));
      }
    }
    return compiled;
  }
147307
public SpannableStringBuilder build() {
        if (mBeforeStringBuilder.length() > 0) {
            mStringBuilder.insert(0, mBeforeStringBuilder);

            // reset SpecialUnit start pos
            if (!mFinalSpecialUnit.isEmpty()) {
                for (BaseSpecialUnit specialUnit : mFinalSpecialUnit) {
                    int[] tempStartPoss = specialUnit.getStartPoss();

                    if (null == tempStartPoss || tempStartPoss.length == 0) continue;

                    for (int i = 0; i < tempStartPoss.length; i++) {
                        int oldStartPos = tempStartPoss[i];
                        tempStartPoss[i] = oldStartPos + mBeforeStringBuilder.length();
                    }
                }
            }

            // reset Cache SpecialClickableUnit start pos
            if (!mCacheSpecialClickableUnitMap.isEmpty()) {
                for (Map.Entry<SpecialClickableUnit, PositionInfo> cm : mCacheSpecialClickableUnitMap.entrySet()) {
                    cm.getValue().startPos += mBeforeStringBuilder.length();
                }
            }
        }

        if (!mBeforeCacheSpecialClickableUnitMap.isEmpty()) {
            mCacheSpecialClickableUnitMap.putAll(mBeforeCacheSpecialClickableUnitMap);
        }

        if (!mBeforeSpecialUnit.isEmpty()) {
            mFinalSpecialUnit.addAll(mBeforeSpecialUnit);
        }

        if (mStringBuilder.length() == 0) return null;
        if (mFinalSpecialUnit.isEmpty())
            return new SpannableStringBuilder(mStringBuilder.toString());

        if (mNormalSizeText.length() == 0) mNormalSizeText.append(mStringBuilder);

        String normalSizeText = mNormalSizeText.toString();
        SpannableStringBuilder spannableStringBuilder = new SpannableStringBuilder(mStringBuilder);
        boolean isInitClickListener = false;
        for (BaseSpecialUnit st : mFinalSpecialUnit) {
            String specialText = st.getText();
            int[] startPoss = st.getStartPoss();

            if (TextUtils.isEmpty(specialText) || null == startPoss || startPoss.length == 0)
                continue;

            int specialTextLength = specialText.length();
            if (st instanceof SpecialTextUnit) {
                // text span
                SpecialTextUnit specialTextUnit = (SpecialTextUnit) st;

                final SpecialClickableUnit internalSpecialClickableUnit = specialTextUnit.getSpecialClickableUnit();
                if (null != internalSpecialClickableUnit) {
                    if (internalSpecialClickableUnit.getNormalTextColor() == 0) {
                        internalSpecialClickableUnit.setNormalTextColor(specialTextUnit.getTextColor());
                    }
                    if (internalSpecialClickableUnit.getNormalBgColor() == 0) {
                        internalSpecialClickableUnit.setNormalBgColor(specialTextUnit.getTextBackgroundColor());
                    }
                }
                for (int startPos : startPoss) {
                    // Set Text Color
                    if (specialTextUnit.getTextColor() != 0) {
                        spannableStringBuilder.setSpan(new ForegroundColorSpan(specialTextUnit.getTextColor()), startPos, startPos + specialTextLength, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
                    }

                    // Set Text Background Color
                    if (specialTextUnit.getTextBackgroundColor() != 0 && null == internalSpecialClickableUnit) {
                        spannableStringBuilder.setSpan(new BackgroundColorSpan(specialTextUnit.getTextBackgroundColor()), startPos, startPos + specialTextLength, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
                    }

                    // Add Underline
                    if (specialTextUnit.isShowUnderline()) {
                        spannableStringBuilder.setSpan(new UnderlineSpan(), startPos, startPos + specialTextLength, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
                    }

                    // Add StrikeThrough
                    if (specialTextUnit.isShowStrikeThrough()) {
                        spannableStringBuilder.setSpan(new StrikethroughSpan(), startPos, startPos + specialTextLength, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
                    }

                    // Set Text Bold
                    if (specialTextUnit.isTextBold()) {
                        spannableStringBuilder.setSpan(new StyleSpan(Typeface.BOLD), startPos, startPos + specialTextLength, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
                    }

                    // Set Text Italic
                    if (specialTextUnit.isTextItalic()) {
                        spannableStringBuilder.setSpan(new StyleSpan(Typeface.ITALIC), startPos, startPos + specialTextLength, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
                    }

                    // Set Text Style
                    if (specialTextUnit.getTextStyle() != Typeface.NORMAL) {
                        spannableStringBuilder.setSpan(new StyleSpan(specialTextUnit.getTextStyle()), startPos, startPos + specialTextLength, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
                    }

                    // Set Text Size
                    if (specialTextUnit.getTextSize() > 0) {
                        TextView curTextView = specialTextUnit.getCurTextView();
                        int gravity = specialTextUnit.getGravity();
                        if (gravity != SpecialGravity.BOTTOM && null != curTextView) {
                            spannableStringBuilder.setSpan(new CustomAbsoluteSizeSpan(normalSizeText, specialTextUnit.getText(), Math.round(specialTextUnit.getTextSize()), curTextView, gravity), startPos, startPos + specialTextLength, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
                        } else {
                            spannableStringBuilder.setSpan(new AbsoluteSizeSpan(Math.round(specialTextUnit.getTextSize()), true), startPos, startPos + specialTextLength, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
                        }
                    }

                    // set clickable
                    if (null != internalSpecialClickableUnit) {
                        if (!isInitClickListener) {
                            isInitClickListener = true;
                            TextView curTextView = internalSpecialClickableUnit.getCurTextView();
                            if (null != curTextView) {
                                curTextView.setMovementMethod(CustomLinkMovementMethod.getInstance());
                            }
                        }
                        spannableStringBuilder.setSpan(new CustomClickableSpan(internalSpecialClickableUnit), startPos, startPos + specialTextLength, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
                    }
                }
            } else if (st instanceof SpecialImageUnit) {
                // image Span
                SpecialImageUnit specialImageUnit = (SpecialImageUnit) st;
                Bitmap bitmap = specialImageUnit.getBitmap();
                int imgWidth = specialImageUnit.getWidth();
                int imgHeight = specialImageUnit.getHeight();
                if (imgWidth > 0 && imgHeight > 0) {
                    int bitWidth = bitmap.getWidth();
                    int bitHeight = bitmap.getHeight();

                    if (imgWidth < bitWidth && imgHeight < bitHeight) {
                        Bitmap newBitmap = ThumbnailUtils.extractThumbnail(bitmap, imgWidth, imgHeight);
                        if (null != newBitmap) {
                            bitmap.recycle();
                            specialImageUnit.setBitmap(newBitmap);
                        }
                    }
                }

                for (int startPos : startPoss) {
                    CustomImageSpan curCustomImageSpan = new CustomImageSpan(normalSizeText, specialImageUnit);
                    spannableStringBuilder.setSpan(curCustomImageSpan, startPos, startPos + specialTextLength, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);

                    if (specialImageUnit.isClickable()) {
                        addClickStateChangeListeners(startPos, startPos + specialTextLength, curCustomImageSpan);
                    }
                }
            } else if (st instanceof SpecialLabelUnit) {
                // label span
                SpecialLabelUnit specialLabelUnit = (SpecialLabelUnit) st;
                for (int startPos : startPoss) {
                    CustomLabelSpan curCustomLabelSpan = new CustomLabelSpan(normalSizeText, specialLabelUnit);
                    spannableStringBuilder.setSpan(curCustomLabelSpan, startPos, startPos + specialTextLength, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);

                    if (specialLabelUnit.isClickable()) {
                        addClickStateChangeListeners(startPos, startPos + specialTextLength, curCustomLabelSpan);
                    }
                }
            } else if (st instanceof SpecialClickableUnit) {
                // clickable span
                SpecialClickableUnit specialClickableUnit = (SpecialClickableUnit) st;

                if (!isInitClickListener) {
                    isInitClickListener = true;
                    TextView curTextView = specialClickableUnit.getCurTextView();
                    if (null != curTextView) {
                        curTextView.setMovementMethod(CustomLinkMovementMethod.getInstance());
                    }
                }

                int startPos = startPoss[0];
                spannableStringBuilder.setSpan(new CustomClickableSpan(specialClickableUnit), startPos, startPos + specialTextLength, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
            } else if (st instanceof SpecialRawSpanUnit) {
                // raw span
                SpecialRawSpanUnit specialRawSpanUnit = (SpecialRawSpanUnit) st;

                int startPos = startPoss[0];
                spannableStringBuilder.setSpan(specialRawSpanUnit.getSpanObj(), startPos, startPos + specialTextLength, specialRawSpanUnit.getFlags());

                // Temporarily unable to support all
            }
        }

        return spannableStringBuilder;
    }
1097639
public Builder toBuilder() {
    Builder builder =
        builder(getServices())
            .additionalArguments(getAdditionalArguments())
            .automaticRestart(automaticRestart)
            .defaultGcsBucketName(defaultGcsBucketName)
            .environment(getEnvironment())
            .host(host)
            .jvmFlags(getJvmFlags())
            .port(port)
            .projectId(projectId);
    return builder;
  }
311257
Builder toBuilder() {
    Builder builder =
        builder()
            .setId(getId())
            .setIsHidden(isHidden())
            .setParts(getParts())
            .addAllSourceLocations(getSourceLocations())
            .setIsPlrselMsg(isPlrselMsg());
    if (getLocaleString() != null) {
      builder.setLocaleString(getLocaleString());
    }
    if (getMeaning() != null) {
      builder.setMeaning(getMeaning());
    }
    if (getDesc() != null) {
      builder.setDesc(getDesc());
    }
    if (getAltId() != -1) {
      builder.setAltId(getAltId());
    }
    if (getContentType() != null) {
      builder.setContentType(getContentType());
    }
    return builder;
  }
150397
public Collection<ComponentBuilder> getComponentBuilders() {
        Collection<ComponentBuilder> result = new ArrayList<>();
        result.addAll(_filterJobBuilders);
        result.addAll(_transformerJobBuilders);
        result.addAll(_analyzerJobBuilders);
        return result;
    }
176647
@Nonnull
  public T build ()
  {
    if (m_aScheduleBuilder == null)
      m_aScheduleBuilder = SimpleScheduleBuilder.simpleSchedule ();
    final IMutableTrigger trig = m_aScheduleBuilder.build ();
    trig.setCalendarName (m_sCalendarName);
    trig.setDescription (m_sDescription);
    trig.setStartTime (m_aStartTime);
    trig.setEndTime (m_aEndTime);
    if (m_aKey == null)
      m_aKey = new TriggerKey (Key.createUniqueName (null), null);
    trig.setKey (m_aKey);
    if (m_aJobKey != null)
      trig.setJobKey (m_aJobKey);
    trig.setPriority (m_nPriority);

    if (!m_aJobDataMap.isEmpty ())
      trig.setJobDataMap (m_aJobDataMap);
    return GenericReflection.uncheckedCast (trig);
  }
917103
public static FactorGraph createFromFactors(List<Factor> factors) {
    VariableNumMap allVars = VariableNumMap.EMPTY;
    for (int i = 0; i < factors.size(); i++) {
      allVars = allVars.union(factors.get(i).getVars());
    }

    String[] factorNames = new String[factors.size()];
    for (int i = 0; i < factors.size(); i++) {
      factorNames[i] = "factor-" + i;
    }
    return new FactorGraph(allVars, factors.toArray(new Factor[factors.size()]), factorNames,
        VariableNumMap.EMPTY, Assignment.EMPTY, null);
  }
1165227
public FragmentBuilder getFragmentBuilder() {
        FragmentBuilder builder = builders.get();

        if (builder == null) {
            if (log.isLoggable(Level.FINEST)) {
                log.finest("Creating new FragmentBuilder");
            }
            builder = new FragmentBuilder();
            builders.set(builder);

            int currentCount = threadCounter.incrementAndGet();
            int builderCount = builder.incrementThreadCount();

            if (log.isLoggable(Level.FINEST)) {
                log.finest("Associate Thread with FragmentBuilder(1): Total Thread Count = " + currentCount
                        + " : Fragment Thread Count = " + builderCount);
                synchronized (threadNames) {
                    threadNames.add(Thread.currentThread().getName());
                }
            }
        }

        return builder;
    }
1309880
public static PojoDescriptorBuilderFactory getInstance() {

    PojoDescriptorBuilderFactory instance = AbstractPojoDescriptorBuilderFactory.getInstance();
    if (instance == null) {
      synchronized (PojoDescriptorBuilderFactoryImpl.class) {
        if (instance == null) {
          PojoDescriptorBuilderFactoryImpl impl = new PojoDescriptorBuilderFactoryImpl();
          instance = impl;
          setInstance(impl);
          impl.initialize();
        }
      }
    }
    return instance;
  }
1122891
public static function instance(): self
    {
        if (!self::$instance) {
            self::$instance = new self(
                Sequencer::sequence('stub-label'),
                MatcherFactory::instance(),
                MatcherVerifier::instance(),
                Invoker::instance(),
                InvocableInspector::instance(),
                EmptyValueFactory::instance(),
                GeneratorAnswerBuilderFactory::instance(),
                InlineExporter::instance()
            );
        }

        return self::$instance;
    }
462795
public function getMultiExtendObjectBuilder()
    {
        if (!isset($this->multiExtendObjectBuilder)) {
            $this->multiExtendObjectBuilder = $this->getGeneratorConfig()->getConfiguredBuilder($this->getTable(), 'objectmultiextend');
        }

        return $this->multiExtendObjectBuilder;
    }
878852
public final SoyTypeP toProto() {
    SoyTypeP local = protoDual;
    if (local == null) {
      SoyTypeP.Builder builder = SoyTypeP.newBuilder();
      doToProto(builder);
      local = builder.build();
      protoDual = local;
    }
    return local;
  }