[Fb-contrib-commit] SF.net SVN: fb-contrib:[1659] trunk/fb-contrib/samples/WOC_Sample.java
Brought to you by:
dbrosius
|
From: <dbr...@us...> - 2011-03-25 23:26:28
|
Revision: 1659
http://fb-contrib.svn.sourceforge.net/fb-contrib/?rev=1659&view=rev
Author: dbrosius
Date: 2011-03-25 23:26:22 +0000 (Fri, 25 Mar 2011)
Log Message:
-----------
add fp to WOC
Modified Paths:
--------------
trunk/fb-contrib/samples/WOC_Sample.java
Modified: trunk/fb-contrib/samples/WOC_Sample.java
===================================================================
--- trunk/fb-contrib/samples/WOC_Sample.java 2011-03-06 21:56:49 UTC (rev 1658)
+++ trunk/fb-contrib/samples/WOC_Sample.java 2011-03-25 23:26:22 UTC (rev 1659)
@@ -1,20 +1,23 @@
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
+import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedHashSet;
import java.util.LinkedList;
+import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.Vector;
-public class WOC_Sample
+public class WOC_Sample
{
private final Set<String> memberSet = new HashSet<String>();
private Set<String> fpSet;
-
+ private final List<String> fpList = new ArrayList<String>();
+
public void testWOCSimple()
{
Set<String> s = new HashSet<String>();
@@ -24,7 +27,7 @@
System.out.println("woops");
}
}
-
+
public Map<String, String> testFPWOCReturn()
{
Map<String, String> m = new HashMap<String, String>();
@@ -33,7 +36,7 @@
fpSet = new HashSet<String>();
return m;
}
-
+
public void testFPWOCAsParm()
{
Map<String, String> m = new HashMap<String, String>();
@@ -42,7 +45,7 @@
fpSet.add("boo");
helper(0, m);
}
-
+
public void testFPWOCCopy()
{
Set<String> s = new LinkedHashSet<String>();
@@ -50,42 +53,42 @@
Set<String> c = s;
memberSet.add("fum");
}
-
+
public void testFPWOCInArray()
{
Vector<Integer> v = new Vector<Integer>();
v.addElement(Integer.valueOf(0));
Object[] o = new Object[] { v };
}
-
+
public void testFPWOCUseReturnVal()
{
LinkedList<String> l = new LinkedList<String>();
l.add("Foo");
l.add("Bar");
-
+
if (l.remove("Foo"))
{
System.out.println("Dont' report");
}
}
-
+
public Set<String> testFPTrinary(boolean b)
{
Set<String> s = new HashSet<String>();
s.add("foo");
s.add("bar");
-
+
return b ? s : Collections.<String>emptySet();
}
-
+
private void helper(int i, Map<String, String> x)
- {
+ {
}
-
+
public void testFPInnerClass(final Set<String> data)
{
- ActionListener al = new ActionListener()
+ ActionListener al = new ActionListener()
{
public void actionPerformed(ActionEvent ae)
{
@@ -93,4 +96,9 @@
}
};
}
+
+ public List<String> fpOtherClass(WOC_Sample ws)
+ {
+ return ws.fpList;
+ }
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|