[
https://issues.apache.org/jira/browse/JDO-598?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12608623#action_12608623
]
Matthew T. Adams commented on JDO-598:
--------------------------------------
Maybe we could support ObjectIdentity with a compareTo method like this:
int compareTo(Object that) {
if (that instanceof Comparable && this.getKey() instanceof Comparable) { /*
cast both & return comparison */ }
else {
return 0; // just return 0 because we don't know
}
}
Thoughts?
> Make SingleFieldIdentity classes implement Comparable
> -----------------------------------------------------
>
> Key: JDO-598
> URL: https://issues.apache.org/jira/browse/JDO-598
> Project: JDO
> Issue Type: Improvement
> Components: api2
> Reporter: Andy Jefferson
> Fix For: JDO 2 maintenance release 2
>
> Attachments: SingleFieldIdentity_Comparable.patch
>
>
> Would be preferable for javax.jdo.identity classes to implement Comparable so
> that we can store them in a TreeSet etc
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.