@param float $trigramLambda
@param float $bigramLambda
@param float $unigramLambda

@return $this
184576
public function setLinearInterpolationSmoothing(float $trigramLambda, float $bigramLambda, float $unigramLambda): Phrase
    {
        return $this->setSmoothingModel('linear_interpolation', [
            'trigram_lambda' => $trigramLambda,
            'bigram_lambda' => $bigramLambda,
            'unigram_lambda' => $unigramLambda,
        ]);
    }
601250
public function setRawData($data)
	{
		if (is_string($data)) {
			$this->rawData(true);
			$this->dataRaw = $data;
		} else {
			throw new RuntimeException('Invalid RAW data setted.');
		}
		
		return $this;
	}
1083890
public function addUnique($unqdata)
    {
        if ($unqdata instanceof Unique) {
            $unique = $unqdata;
            $unique->setTable($this);
            $unique->getName(); // we call this method so that the name is created now if it doesn't already exist.
            $this->unices[] = $unique;

            return $unique;
        } else {
            $unique = new Unique($this);
            $unique->loadFromXML($unqdata);

            return $this->addUnique($unique);
        }
    }
693976
public function write($data)
    {
        $streamResource = $this->getStreamResource();
        if (!is_resource($streamResource)) {
            throw new \UnexpectedValueException('Stream resource parameter must be a resource');
        }

        $dataLength = strlen($data);

        if ($dataLength !== fwrite($streamResource, $data, $dataLength)) {
            throw new \RuntimeException('Unable to write data to the stream');
        }

        return $this;
    }
1049397
public function setCallback($data = [])
    {
        if (is_array($data)) {

            if (array_key_exists('callbackOnFail', $data)) {
                $this->setSecondaryCallbackURL($data['callbackOnFail']);
            }

            if (array_key_exists('callbackOnSuccess', $data)) {
                $this->setPrimaryCallbackURL($data['callbackOnSuccess']);
            }

            if (array_key_exists('error', $data)) {
                $this->setSecondaryCallbackURL($data['error']);
            }

            if (array_key_exists('success', $data)) {
                $this->setPrimaryCallbackURL($data['success']);
            }

            if (array_key_exists('callback', $data)) {
                $this->setCallback($data['callback']);
            }
        }

        return $this->callback($data);
    }
6007
public void setLambda1(double lambda1)
    {
        if(lambda1 < 0 || Double.isNaN(lambda1) || Double.isInfinite(lambda1))
            throw new IllegalArgumentException("Lambda1 must be non-negative, not " + lambda1);
        this.lambda1 = lambda1;
    }
97112
public function setMediotecaTypeId(int $nb_medioteca_type_id) : CNabuDataObject
    {
        if ($nb_medioteca_type_id === null) {
            throw new ENabuCoreException(
                    ENabuCoreException::ERROR_NULL_VALUE_NOT_ALLOWED_IN,
                    array("\$nb_medioteca_type_id")
            );
        }
        $this->setValue('nb_medioteca_type_id', $nb_medioteca_type_id);
        
        return $this;
    }
103927
public function bulkSet($registrationIds = array(), $data = null, $collapseKey = null)
    {
        $this->setRegistrationIds($registrationIds);
        $this->setData($data);
        $this->setCollapseKey($collapseKey);
    }
956487
public function setCurrencyFromIsoAlpha3Code($isoAlpha3Code)
    {
        try {
            /** @var \Tx_Oelib_Mapper_Currency $mapper */
            $mapper = \Tx_Oelib_MapperRegistry::get(\Tx_Oelib_Mapper_Currency::class);
            $this->currency = $mapper->findByIsoAlpha3Code($isoAlpha3Code);
        } catch (Exception $exception) {
            $this->currency = null;
        }
    }
1252954
public function setUserGroupTypeId(int $nb_user_group_type_id) : CNabuDataObject
    {
        if ($nb_user_group_type_id === null) {
            throw new ENabuCoreException(
                    ENabuCoreException::ERROR_NULL_VALUE_NOT_ALLOWED_IN,
                    array("\$nb_user_group_type_id")
            );
        }
        $this->setValue('nb_user_group_type_id', $nb_user_group_type_id);
        
        return $this;
    }
1116624
public function load($sensitiveWords = array(), $trieTree = WordBan::LOAD_WORDS)
    {
        if (!is_array($sensitiveWords) || empty($sensitiveWords)) {
            throw new \Exception('The loaded data is empty!');
        }
        if ($trieTree === WordBan::LOAD_TRIE_TREE && isset($sensitiveWords['Normal']) && isset($sensitiveWords['LowCase'])) {
            $this->_wordsTrieTree = $sensitiveWords['Normal'];
            $this->_wordsTrieTreeLowCase = $sensitiveWords['LowCase'];
        } else {
            foreach ($sensitiveWords as $word) {
                if ($word == '') break;
                $now_words = &$this->_wordsTrieTree;
                $now_words_lower = &$this->_wordsTrieTreeLowCase;
                $word_length = mb_strlen($word);
                for ($i = 0; $i < $word_length; $i++) {
                    $char = mb_substr($word, $i, 1);
                    $char_lower = strtolower($char);
                    if (!isset($now_words[$char])) {
                        $now_words[$char] = false;
                    }
                    if (!isset($now_words_lower[$char_lower])) {
                        $now_words_lower[$char_lower] = false;
                    }
                    $now_words = &$now_words[$char];
                    $now_words_lower = &$now_words_lower[$char_lower];
                }
            }
        }
        return true;
    }
1058722
@Nonnull
	public static <T1, T2, T3> LTriPredicateBuilder<T1, T2, T3> triPredicate() {
		return new LTriPredicateBuilder();
	}
196705
public function dividedBy($that) : BigRational
    {
        $that = BigRational::of($that);

        $numerator   = $this->numerator->multipliedBy($that->denominator);
        $denominator = $this->denominator->multipliedBy($that->numerator);

        return new BigRational($numerator, $denominator, true);
    }
1167233
public function setMessagingTemplateId(int $nb_messaging_template_id) : CNabuDataObject
    {
        if ($nb_messaging_template_id === null) {
            throw new ENabuCoreException(
                    ENabuCoreException::ERROR_NULL_VALUE_NOT_ALLOWED_IN,
                    array("\$nb_messaging_template_id")
            );
        }
        $this->setValue('nb_messaging_template_id', $nb_messaging_template_id);
        
        return $this;
    }
523261
public static function zero() : BigRational
    {
        static $zero;

        if ($zero === null) {
            $zero = new BigRational(BigInteger::zero(), BigInteger::one(), false);
        }

        return $zero;
    }
170158
public function setRGB($pValue = '000000') {
		if ($pValue == '') {
			$pValue = '000000';
		}
		if ($this->_isSupervisor) {
			$styleArray = $this->getStyleArray(array('argb' => 'FF' . $pValue));
			$this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray);
		} else {
			$this->_argb = 'FF' . $pValue;
		}
		return $this;
	}
567623
private Set<BlockPos> readLongArray(NBTTagCompound compound)
	{
		ByteBuf bytes = Unpooled.copiedBuffer(compound.getByteArray("chunkNotifier"));
		Set<BlockPos> set = Sets.newHashSet();
		for (int i = 0; i < bytes.capacity() / 8; i++)
			set.add(BlockPos.fromLong(bytes.readLong()));
		return set;
	}

	/**
	 * Write long array into {@link NBTTagCompound}.<br>
	 * From IvNBTHelper.writeNBTLongs()
	 *
	 * @author Ivorius
	 * @param compound the compound
	 * @param longs the longs
	 */
	private void writeLongArray(NBTTagCompound compound, Set<BlockPos> set)
	{
		ByteBuf bytes = Unpooled.buffer(set.size() * 8);
		set.forEach(p -> bytes.writeLong(p.toLong()));
		compound.setByteArray("chunkNotifier", bytes.array());
	}

	/**
	 * Called when a client requests a {@link Chunk} from the server only.<br>
	 * Sends the chunks coordinates to the client.
	 *
	 * @param event the event
	 */
	@SubscribeEvent
	public void onChunkWatched(ChunkWatchEvent.Watch event)
	{
		Chunk chunk = event.getPlayer().world.getChunkFromChunkCoords(event.getChunk().x, event.getChunk().z);
		Set<BlockPos> coords = chunks(chunk).get(chunk);
		if (!coords.isEmpty())
			ChunkBlockMessage.sendCoords(chunk, coords, event.getPlayer());
	}

	/**
	 * Client only.<br>
	 * Sets the coordinates for a chunk received by {@link ChunkBlockMessage}.
	 *
	 * @param chunkX the chunk x
	 * @param chunkZ the chunk z
	 * @param coords the coords
	 */
	public void setCoords(int chunkX, int chunkZ, Set<BlockPos> coords)
	{
		Chunk chunk = Utils.getClientWorld().getChunkFromChunkCoords(chunkX, chunkZ);
		chunks(chunk).addAll(chunk, coords);
	}

	//#end Events

	/**
	 * Gets the chunks inside distance from coordinates.
	 *
	 * @param world the world
	 * @param x the x
	 * @param z the z
	 * @param distance the size
	 * @return the chunks
	 */
	//TODO: move into Utils
	public static List<Chunk> getAffectedChunks(World world, int x, int z, int distance)
	{
		AxisAlignedBB aabb = new AxisAlignedBB(x - distance, 0, z - distance, x + distance + 1, 1, z + distance + 1);
		return getAffectedChunks(world, aabb);
	}

	/**
	 * Gets the chunks colliding with the specified {@link AxisAlignedBB}. q
	 *
	 * @param world the world
	 * @param aabbs the aabbs
	 * @return the affected chunks
	 */
	//TODO: move into Utils
	public static List<Chunk> getAffectedChunks(World world, AxisAlignedBB... aabbs)
	{
		if (ArrayUtils.isEmpty(aabbs))
			return ImmutableList.of();

		List<Chunk> chunks = new ArrayList<>();
		for (AxisAlignedBB aabb : aabbs)
		{
			if (aabb == null)
				continue;
			for (int cx = (int) Math.floor(aabb.minX) >> 4; cx <= (int) Math.ceil(aabb.maxX) >> 4; cx++)
			{
				for (int cz = (int) Math.floor(aabb.minZ) >> 4; cz <= (int) Math.ceil(aabb.maxZ) >> 4; cz++)
				{
					if (world.getChunkProvider() != null && world.getChunkProvider().getLoadedChunk(cx, cz) != null)
						chunks.add(world.getChunkFromChunkCoords(cx, cz));
				}
			}
		}
		return chunks;
	}

	/**
	 * Gets the {@link ChunkBlockHandler} instance.
	 *
	 * @return the chunk block handler
	 */
	public static ChunkBlockHandler get()
	{
		return instance;
	}

	/**
	 * This class is the base for a process that is to be called for every coordinate stored inside a {@link Chunk}.
	 */
	public static abstract class ChunkProcedure implements TLongProcedure
	{
		protected World world;
		protected Chunk chunk;
		protected MBlockState state;

		/**
		 * Sets the {@link Chunk} (and {@link World}) for this {@link ChunkProcedure}.
		 *
		 * @param chunk the chunk
		 */
		protected void set(Chunk chunk)
		{
			this.world = chunk.getWorld();
			this.chunk = chunk;
		}

		/**
		 * Checks whether the passed coordinate is a valid {@link IChunkBlock}.<br>
		 * Also sets the {@link MBlockState} for this {@link ChunkProcedure}.
		 *
		 * @param coord the coord
		 * @return true, if successful
		 */
		protected boolean check(long coord)
		{
			state = new MBlockState(world, coord);

			if (!(state.getBlock() instanceof IChunkBlock))
			{
				MalisisCore.log.info(	"[ChunkNotificationHandler]  Removing invalid {} coordinate : {} in chunk {},{}",
										world.isRemote ? "client" : "server",
										state,
										chunk.x,
										chunk.z);
				get().removeCoord(chunk, state.getPos());
				return false;
			}

			return true;
		}

		/**
		 * Cleans the current state for this {@link ChunkProcedure} for the next coordinate.
		 */
		protected void clean()
		{
			world = null;
			chunk = null;
			state = null;
		}
	}

}