Skip to content

TypeId record should implement Comparable<TypeId> #9

Open
@kevintweber-crandkgroup

Description

Nice library!

The TypeId record should implement the Comparable interface:

@Override
public int compareTo(@Nullable TypeId o) {
    if (this == o) return 0;
    if (o == null) return 1;

    return this.toString().compareTo(o.toString());
}

or something similar.

Currently, I'm writing my own Comparator class, which is kinda clunky. A built-in Comparable interface would be much better.

Thanks!

-- Kevin

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions