@param mixed      $hashValue
@param mixed|null $rangeValue

@return $this
961746
public function setPrimaryKey($hashValue, $rangeValue = null)
    {
        return $this->setIdentifier($this->class->createIdentifierFromValues($hashValue, $rangeValue));
    }
1372981
public function fromPersistenceValue(FieldValue $fieldValue)
    {
        if ($fieldValue->externalData === null) {
            return $this->getEmptyValue();
        }

        return $this->fromHash($fieldValue->externalData);
    }
616216
public function setValue($pValue = null)
    {
        if (!self::getValueBinder()->bindValue($this, $pValue)) {
            throw new PHPExcel_Exception("Value could not be bound to cell.");
        }
        return $this;
    }
679513
public function setRange($value)
    {
        if ($value != null) {
            $this->_params['range'] = $value;
        } else {
            unset($this->_params['range']);
        }
        return $this;
    }
1236589
public function fieldValueToHash($fieldValue, array $context = array())
    {
        if ($fieldValue->uri == null) {
            return null;
        }

        return array(
            'path' => realpath($this->ioRootDir) . '/' . ($this->ioDecorator ? $this->ioDecorator->undecorate($fieldValue->uri) : $fieldValue->uri),
            'filename'=> $fieldValue->fileName,
            'mime_type' => $fieldValue->mimeType,
            'has_controller' => $fieldValue->hasController,
            'autoplay' => $fieldValue->autoplay,
            'loop'=> $fieldValue->loop,
            'width' => $fieldValue->width,
            'height' => $fieldValue->height,
        );
    }
1188150
public function removeValue(FieldValue $fieldValue)
    {
        if ($this->fieldValues->contains($fieldValue)) {
            $this->fieldValues->removeElement($fieldValue);
        }
    }
1150586
public function setDefaultValue($defaultValue): FieldInterface
    {
        if (!is_scalar($defaultValue) && !is_null($defaultValue)) {
            throw new \InvalidArgumentException(
                "invalid value provided for 'defaultValue'; ".
                "expecting either a scalar or null value"
            );
        }
        $this->defaultValue = $defaultValue;
        return $this;
    }
796810
public function fromHash($hash)
    {
        if ($hash === null) {
            return $this->getEmptyValue();
        }

        if (isset($hash['text'])) {
            return new Value($hash['link'], $hash['text']);
        }

        return new Value($hash['link']);
    }
1362845
public function andReturn($returnValue)
    {
        $this->expectation->setPerformCallback(function($name, $args) use ($returnValue) {
            if ($returnValue instanceof \Closure) {
                return $returnValue($args);
            } else {
                return $returnValue;
            }
        });
        
        return $this;
    }
652591
public static <T> Set<T> nullToEmptySet(Set<T> newValue) {
    if (newValue == null) {
      return new HashSet<>();
    }
    return newValue;
  }
481678
public function addHeaderValue($header, $headerValue): Builder
    {
        if (!isset($this->headers[$header])) {
            $this->headers[$header] = $headerValue;
        } else {
            $this->headers[$header] = array_merge((array)$this->headers[$header], [$headerValue]);
        }
        $this->removePlugin(Plugin\HeaderAppendPlugin::class);
        $this->addPlugin(new Plugin\HeaderAppendPlugin($this->headers));

        return $this;
    }
489742
public function fromPersistenceValue(PersistenceValue $fieldValue)
    {
        // Restored data comes in $data, since it has already been processed
        // there might be more data in the persistence value than needed here
        $result = $this->fromHash(
            array(
                'id' => (isset($fieldValue->externalData['id'])
                    ? $fieldValue->externalData['id']
                    : null),
                'fileName' => (isset($fieldValue->externalData['fileName'])
                    ? $fieldValue->externalData['fileName']
                    : null),
                'fileSize' => (isset($fieldValue->externalData['fileSize'])
                    ? $fieldValue->externalData['fileSize']
                    : null),
                'mimeType' => (isset($fieldValue->externalData['mimeType'])
                    ? $fieldValue->externalData['mimeType']
                    : null),
                'uri' => (isset($fieldValue->externalData['uri'])
                    ? $fieldValue->externalData['uri']
                    : null),
            )
        );

        return $result;
    }
658419
private function getterSetter($field, $fieldValue)
    {
        if ($fieldValue == null) {
            return $this->$field;
        }

        $this->$field = $fieldValue;

        return $this;
    }
1271416
function() {
		var hashKey = _.result( this, 'hashAttribute' ) || _.result( this, 'idAttribute' ),
			rangeKey = _.result( this, 'rangeAttribute' ),
			hashValue = this.get( hashKey ),
			rangeValue = rangeKey ? this.get( rangeKey ) : null;

		return hashValue == null || ( rangeKey && rangeValue == null );
	}
1042193
public function postProcessValueHash($outgoingValueHash)
    {
        if (
            !isset($outgoingValueHash['destinationContentIds']) ||
            !is_array($outgoingValueHash['destinationContentIds']) ||
            !$this->canMapContentHref()
        ) {
            return $outgoingValueHash;
        }

        $outgoingValueHash['destinationContentHrefs'] = array_map(
            function ($contentId) {
                return $this->mapToContentHref($contentId);
            },
            $outgoingValueHash['destinationContentIds']
        );

        return $outgoingValueHash;
    }
641029
public function addHeader($headerFieldNameOrLine, $fieldValue = null)
	{
		$this->getHeaders()->addTextHeader($headerFieldNameOrLine, $fieldValue);
		return $this;
	}
912628
public static Range range(final double minValue, final double maxValue) {
        if (minValue > maxValue) {
            throw new IllegalArgumentException("minValue should be less then or equal to maxValue (" + minValue+ ", " + maxValue + ")");
        }
        return new Range() {

            @Override
            public Number getMinimum() {
                return minValue;
            }

            @Override
            public Number getMaximum() {
                return maxValue;
            }

            @Override
            public String toString() {
                return Ranges.toString(this);
            }
            
        };
    }