Get the maximum instance between a given instance (default now) and the current instance.

@param Verta|null $v

@return static
339312
public function max(Verta $v = null)
    {
        $v = $v ?: static::now($this->getTimezone());

        return $this->gt($v) ? $this : $v;
    }
669390
public function closest(Verta $v1, Verta $v2)
    {
        return $this->diffSeconds($v1) < $this->diffSeconds($v2) ? $v1 : $v2;
    }
831237
public function setMax($v)
    {
        if ($v !== null) {
            $v = (double) $v;
        }

        if ($this->max !== $v) {
            $this->max = $v;
            $this->modifiedColumns[AttributeTypeTableMap::MAX] = true;
        }


        return $this;
    }
1177574
public function setRoleId($v)
    {
        if ($v !== null) {
            $v = (int) $v;
        }

        if ($this->role_id !== $v) {
            $this->role_id = $v;
            $this->modifiedColumns[RolePermissionTableMap::COL_ROLE_ID] = true;
        }

        if ($this->aRole !== null && $this->aRole->getId() !== $v) {
            $this->aRole = null;
        }

        return $this;
    }
812653
private static function getInstance()
	{
		$accessor = static::getContainerAccessor();

		if (!isset(static::$instances[$accessor])) {
			$container = static::getContainer();
			static::$instances[$accessor] = $container[$accessor];
		}

		return static::$instances[$accessor];
	}
1264489
public function diffHours(Verta $v = null)
    {
        return (int) ($this->diffSeconds($v) / static::SECONDS_PER_MINUTE / static::MINUTES_PER_HOUR);
    }
238728
public function setParentId($v)
    {
        if ($v !== null) {
            $v = (int) $v;
        }

        if ($this->parent_id !== $v) {
            $this->parent_id = $v;
            $this->modifiedColumns[SkillDependencyTableMap::COL_PARENT_ID] = true;
        }

        if ($this->aSkillRelatedByParentId !== null && $this->aSkillRelatedByParentId->getId() !== $v) {
            $this->aSkillRelatedByParentId = null;
        }

        return $this;
    }
268502
public function setMax($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\Value::class);
        $this->max = $var;

        return $this;
    }
576236
static public function instance($type=null)
    {
        $type = $type ?: 'default';
        if (!isset(static::$instances[$type])) {
            $options = ['type' => $type];
            static::$instances[$type] = new static($options);
        }
        return static::$instances[$type];
    }
257801
public function max(Date $dt = null)
    {
        $dt = $dt ?: static::now($this->getTimezone());

        return $this->isAfter($dt) ? clone $this : clone $dt;
    }
1206341
public function last()
    {
        $keys = AccessHelper::collectionKeys($this->data);

        if (empty($keys)) {
            return null;
        }

        $value = $this->data[end($keys)] ? $this->data[end($keys)] : null;

        return AccessHelper::isCollectionType($value) ? new static($value, $this->options) : $value;
    }
302473
static function &getInstance($key=null)
	{
		static $instances;

		if (!isset($instances))
		{
			$instances = array();
		}

		if (!isset($instances[$key]))
		{
			$instances[$key] = new static($key);
		}

		return $instances[$key];
	}
1312062
function maxV(v) {
         return this._set(this.x > v.x ? this.x : v.x, this.y > v.y ? this.y : v.y);
       }
164479
public function setVisible($v)
    {
        if ($v !== null) {
            $v = (int) $v;
        }

        if ($this->visible !== $v) {
            $this->visible = $v;
            $this->modifiedColumns[PersonImageVersionTableMap::VISIBLE] = true;
        }


        return $this;
    }
227318
public function first()
    {
        $keys = array_keys($this->rows);
        return current($keys) === false ? null : $this->instanceRow($this->rows[current($keys)], $this->realRows ? : $this);
    }
325694
public function farthest(Verta $v1, Verta $v2)
    {
        return $this->diffSeconds($v1) > $this->diffSeconds($v2) ? $v1 : $v2;
    }
429929
public function max($max=null)
    {
        $max = LambdaUtils::toSelectCallable($max);
        $temp = $this->select($max)->toArray();
        return max($temp);
    }