<?php
/**
 * Enum Comparison Trait
 *
 * @version     1.0.$Revision:$
 * @version     SVN: $Id:$
 * @package     bplan-base/globals
 * @subpackage  Traits
 * @author      Wassilios Meletiadis <wassilios.meletiadis@bplan-solutions.de>
 * @copyright   Copyright (C) 2025, 2026 bplan-solutions GmbH & Co. KG <https://www.bplan-solutions.de/>
 * /Δ\
 */

namespace BplanBase\Globals\Traits;


/**
 * Enum Comparison Trait
 *
 * @version     1.0.0 / 2026-05-22
 * @author      Wassilios Meletiadis <wassilios.meletiadis@bplan-solutions.de>
 */
trait EnumComparison
{


/* +++ TRAITS +++ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */


/* +++ CLASS CONSTANTS +++ ++++++++++++++++++++++++++++++++++++++++++++++++++ */


/* +++ OBJECT MEMBERS +++ +++++++++++++++++++++++++++++++++++++++++++++++++++ */


/* +++ CLASS MEMBERS +++ ++++++++++++++++++++++++++++++++++++++++++++++++++++ */


/* +++ OBJECT METHODS +++ +++++++++++++++++++++++++++++++++++++++++++++++++++ */


    /**
     *
     * @param       \UnitEnum $Other
     *
     * @return      bool
     *
     * @version     1.0.0 / 2026-05-22
     * @author      Wassilios Meletiadis <wassilios.meletiadis@bplan-solutions.de>
     */
    public function isGreaterThan(self $Other): bool
    {
        return $this->value > $Other->value;

    } // isGreaterThan()


    /**
     *
     * @param       \UnitEnum  $Other
     *
     * @return      bool
     *
     * @version     1.0.0 / 2026-05-22
     * @author      Wassilios Meletiadis <wassilios.meletiadis@bplan-solutions.de>
     */
    public function isGreaterThanOrEqualTo(self $Other): bool
    {
        return $this->value >= $Other->value;

    } // isGreaterThanOrEqualTo()


    /**
     *
     * @param       \UnitEnum  $Other
     *
     * @return      bool
     *
     * @version     1.0.0 / 2026-05-22
     * @author      Wassilios Meletiadis <wassilios.meletiadis@bplan-solutions.de>
     */
    public function isLesserThan(self $Other): bool
    {
        return $this->value < $Other->value;

    } // isLesserThan()


    /**
     *
     * @param       \UnitEnum  $Other
     *
     * @return      bool
     *
     * @version     1.0.0 / 2026-05-22
     * @author      Wassilios Meletiadis <wassilios.meletiadis@bplan-solutions.de>
     */
    public function isLesserThanOrEqualTo(self $Other): bool
    {
        return $this->value <= $Other->value;

    } // isLesserThanOrEqualTo()


/* +++ CLASS METHODS +++ ++++++++++++++++++++++++++++++++++++++++++++++++++++ */


} // trait EnumComparison {}
