# coding=utf-8
from typing import Any

TyAoO = list[Any]


class AoO:
    """Manage Array of Objects.

    A static utility class for operations on lists of arbitrary objects.
    """

    @staticmethod
    def to_unique(aoo: TyAoO) -> TyAoO:
        """Remove duplicates and ``None`` values from the array.

        :param TyAoO aoo: Array of objects.
        :returns: New array with unique, non-None elements.
        :rtype: TyAoO
        """
        aoo_new: TyAoO = []
        for _obj in aoo:
            if _obj not in aoo_new and _obj is not None:
                aoo_new.append(_obj)
        return aoo_new
