Since most models are read-only anyway, how about doing this as well to get
to a Java 8 SAM (modeled after
https://docs.oracle.com/javase/8/docs/api/java/util/Iterator.html#remove--):
default void setObject(T T) {
throw new UnsupportedOperationException();
}
Andrew
On Mon, Oct 5, 2015 at 5:31 PM, Tobias Soloschenko <
[email protected]> wrote:
> +1
>
> kind regards
>
> Tobias
>
> Am 05.10.15 um 22:42 schrieb Martijn Dashorst:
>
> Should we use an empty default implementation for IModel#detach?
>>
>>
>> public class IModel<T> extends IDetachable
>> {
>> ...
>>
>> @Override
>> default void detach()
>> {
>> }
>> }
>>
>> This won't break existing applications, but might make it a bit easier
>> on the eyes to implement IModel directly.
>>
>> I'm not in favor of applying the default method to IDetachable,
>> because that would defeat the interface's purpose IMO.
>>
>> WDYT?
>>
>> Martijn
>>
>
>