Arrow typed errors library in java

42 Views Asked by At

It's not clear to if I'm able to use arrow typed error classes in java.

I've took a look on arrow typed errors documentation here.

I mean, I'm aware I'm able to import maven artifact dependency into my java project, but it's not clear to how to use its classes. Am I able to use Either, or EitherKt.

Which limitations am I going to face with?

I've played a bit, but I'm getting some compilation warnings:

    public static Either<NonEmptyList<String>, Reference> of(ReferenceUniqueIdentifier referenceUniqueIdentifier) {
        Either left = EitherKt.left("String");
        return left;
    }

Compilation warnings:

Either is a raw type. References to generic type Either<A,B> should be parameterized Java (16777788) [30, 3]

Type safety: The expression of type Either needs unchecked conversion to conform to Either<NonEmptyList,Reference> Java (16777748) [31, 10]

0

There are 0 best solutions below