From 8b7a7cbc813653a3248d6cf3a7779e220957bc85 Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Mon, 8 May 2017 21:28:02 +0200 Subject: The great rename: the old ‘website’ is now ‘website-old’, and ‘website2’ is now ‘website’. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../experimental/DelegateExample_pre.jpage | 37 ---------------------- 1 file changed, 37 deletions(-) delete mode 100644 website2/usageExamples/experimental/DelegateExample_pre.jpage (limited to 'website2/usageExamples/experimental/DelegateExample_pre.jpage') diff --git a/website2/usageExamples/experimental/DelegateExample_pre.jpage b/website2/usageExamples/experimental/DelegateExample_pre.jpage deleted file mode 100644 index 885ab3a8..00000000 --- a/website2/usageExamples/experimental/DelegateExample_pre.jpage +++ /dev/null @@ -1,37 +0,0 @@ -import java.util.ArrayList; -import java.util.Collection; - -import lombok.experimental.Delegate; - -public class DelegationExample { - private interface SimpleCollection { - boolean add(String item); - boolean remove(Object item); - } - - @Delegate(types=SimpleCollection.class) - private final Collection collection = new ArrayList(); -} - - -class ExcludesDelegateExample { - long counter = 0L; - - private interface Add { - boolean add(String x); - boolean addAll(Collection x); - } - - @Delegate(excludes=Add.class) - private final Collection collection = new ArrayList(); - - public boolean add(String item) { - counter++; - return collection.add(item); - } - - public boolean addAll(Collection col) { - counter += col.size(); - return collection.addAll(col); - } -} -- cgit