@Override
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }

        if (!(obj instanceof OptionalArray)) {
            return false;
        }

        OptionalArray<?> other = (OptionalArray<?>) obj;
        return Objects.equals(value, other.value);
    }