You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Max Leuthäuser edited this page Oct 16, 2015
·
3 revisions
Title
An object and its roles have different identities
Description
This view, which is quite singular, is a tribute to the so-called counting problem. It refers to the situation in which instances counted in their roles yield a greater number than the same instances counted by the objects playing the roles. For example, the number of passengers taking a certain means of transportation in one week may be greater than the number of individual persons traveling with that means during the same period.
Implementation
None.
Additional hints
You can always override the equals and hashCode functions on your role classes to implement you own custom identity behavior.