Inserts the given line above the given line number
(or above the current one if none provided).
Note: the current line is then set to the new one.

@param Text   $text
@param string $addition
@param int    $location

@api
340436
public function insertAbove(Text $text, $addition, $location = null)
    {
        $input = array(
            'text' => $text,
            'location' => $location,
            'addition' => $addition,
        );
        $this->commandInvoker->run('insert_above', $input);
    }
83809
public MultiChangeBuilder<PS, SEG, S> insertText(int position, String text) {
        return replaceText(position, position, text);
    }
267673
public void addLine(String line) {
        int sep = line.indexOf('=');
        if(sep > 0) {
            put(line.substring(0,sep),line.substring(sep+1));
        }
    }
1314793
public static function add(string $text, string $tag): string
    {
        return self::wrap($text, $tag);
    }
1266079
public function push($title, $text)
    {
        if (!is_string($title) || !is_string($text)) {
            throw new IncorrectUsageException('Push failed: Title or Text is not string');
        }

        return $this->adapter->put('/tracker', ['title' => $title, 'text' => $text]);
    }
288257
public function addStringWater(Text $text, $position) {

        if ( !$this->imgDst ) return;

        $this->position = $position;

        if ( !$position ) {
            $this->position = self::POS_RANDOM;
        } else {
            $this->position = $position;
        }
        $fontColor = StringUtils::hex2rgb($text->getColor());
        $color = imagecolorallocatealpha($this->imgDst,
            $fontColor['r'],
            $fontColor['g'],
            $fontColor['b'],
            $text->getAlpha());

        $sizeSrc = $this->getImageSize($this->imgDst);
        if ( !file_exists($text->getFont()) ) {
            $text->setFont(dirname(__FILE__).$text->getFont());
        }

        $ttfBox = imagettfbbox($text->getFontsize(), $text->getAngle(), $text->getFont(), $text->getContent());
        $textWidth = $ttfBox[2] - $ttfBox[0];
        $textHeight = abs($ttfBox[7]);
        $waterPosition = $this->getWaterPos($sizeSrc, array($textWidth, $textHeight));
        if ( $this->imgDst ) {
            imagettftext(
                $this->imgDst,
                $text->getFontsize(),
                $this->angle,
                $waterPosition[0],
                $waterPosition[1]+$textHeight,
                $color,
                $text->getFont(),
                $this->getEncodedText($text->getContent()));
        }

        return $this;

    }
219208
public void addSolution(int location) {
    //Increase the solutions in the location specified.
    hypercubes[location]++;

    //Update the most populated hypercube
    if (hypercubes[location] > hypercubes[mostPopulatedHypercube]) {
      mostPopulatedHypercube = location;
    }

    //if hypercubes[location] becomes to one, then recalculate 
    //the occupied hypercubes
    if (hypercubes[location] == 1) {
      this.calculateOccupied();
    }
  }
1166838
public function addLocation(Location $location)
    {
        // If this is the first Location, we can assume it can be the default
        if (!count($this->locations))
        {
            $this->setDefaultLocation($location);
        }

        $this->locations[] = $location;
        $location->setProfile($this);
    }
571244
public function addPlaceholder($text, $isPlain = true, $lang = 'en')
    {
        $value = '__placeholder';

        $this->placeholders[$lang] = new Label($text, $this->getLocaleKey('_placeholder'), $isPlain, $lang, $this->name . $value);
    }
842793
function Insert (str, position) {
    if (!this || this.constructor !== SimpleTextOperation) {
      // => function was called without 'new'
      return new Insert(str, position);
    }
    this.str = str;
    this.position = position;
  }
283789
public void setText(String text) {
        span.setText(text);

        if (!span.isAttached()) {
            add(span);
        }
    }
1274504
@Override
    public void insert(CharSequence text) throws IOException
    {
        int ln = text.length();
        if (ln == 0)
        {
            return;
        }
        if (ln >= size - (end-cursor))
        {
            throw new IOException(text+" doesn't fit in the buffer");
        }
        if (cursor != end)
        {
            makeRoom(ln);
        }
        for (int ii=0;ii<ln;ii++)
        {
            set((cursor+ii), text.charAt(ii));
        }
        end += ln;
    }
934593
protected function onSetText(string $text): void
    {
        parent::onSetText($text);

        $this->isInvalid = false;
        $this->value = null;

        if ($this->hasError()) {
            return;
        }

        if ($this->isEmpty()) {
            return;
        }

        if (!preg_match('/^[-+]?[0-9]+$/', $text)) {
            $this->setError('Invalid value');
            $this->isInvalid = true;

            return;
        }

        $value = intval($text);

        if ($this->minimumValue !== null && $value < $this->minimumValue || $this->maximumValue !== null && $value > $this->maximumValue) {
            $this->setError('Invalid value');
            $this->isInvalid = true;

            return;
        }

        $this->value = $value;
    }
20771
private void pushText() {
    if (buf.length() > 0) {
      nodes.add(new NumberPattern.Text(buf.toString()));
      buf.setLength(0);
    }
  }
890293
private function createTranslationAddForm(Location $location): FormInterface
    {
        $data = new TranslationAddData($location);

        return $this->formFactory->createNamed('add-translation', TranslationAddType::class, $data);
    }
420332
public function addLocation($location)
    {
        if (is_array($location)) {
            $this->locations = array_merge($this->locations, $location);
        } else {
            $this->locations[] = $location;
        }

        return $this;
    }
1351184
public function addLocation(Location $location): void
    {
        if ($this->locations->contains($location)) {
            throw new \InvalidArgumentException(
                    'The same Location cannot be added twice');
        }
        $location->setWarehouse($this);
        $this->locations->add($location);
    }