You are here

public function Measurement::lessThan in Physical Fields 8

Gets whether the current measurement is lesser than the given measurement.

Parameters

\Drupal\physical\Measurement $measurement: The measurement.

Return value

bool TRUE if the current measurement is lesser than the given one, FALSE otherwise.

1 call to Measurement::lessThan()
Measurement::lessThanOrEqual in src/Measurement.php
Gets whether the current measurement is lesser than or equal to the given measurement.

File

src/Measurement.php, line 267

Class

Measurement
Provides a base class for measurement value objects.

Namespace

Drupal\physical

Code

public function lessThan(Measurement $measurement) {
  return $this
    ->compareTo($measurement) == -1;
}