[Fb-contrib-commit] SF.net SVN: fb-contrib: [886] trunk/fb-contrib/samples/UAA_Sample.java
Brought to you by:
dbrosius
From: <dbr...@us...> - 2007-06-24 22:23:03
|
Revision: 886 http://svn.sourceforge.net/fb-contrib/?rev=886&view=rev Author: dbrosius Date: 2007-06-24 15:23:02 -0700 (Sun, 24 Jun 2007) Log Message: ----------- add some initial test cases for UAA Added Paths: ----------- trunk/fb-contrib/samples/UAA_Sample.java Added: trunk/fb-contrib/samples/UAA_Sample.java =================================================================== --- trunk/fb-contrib/samples/UAA_Sample.java (rev 0) +++ trunk/fb-contrib/samples/UAA_Sample.java 2007-06-24 22:23:02 UTC (rev 886) @@ -0,0 +1,54 @@ +import java.util.HashSet; +import java.util.Map; +import java.util.Set; + + +public class UAA_Sample { + + private Set<String> in = new HashSet<String>(); + private Set<String> out = new HashSet<String>(); + + public Set<String> testLocalSet(Set<String> in) { + Set<String> out = new HashSet<String>(); + out.add("Foo"); + out.add("Bar"); + for (String s : in) { + out.add(s); + } + return out; + } + + public Set<String> testFPCondition(Set<String> in) { + Set<String> out = new HashSet<String>(); + for (String s : in) { + if (s.startsWith("a")) + out.add(s); + } + return out; + } + + public Set<String> testKeyOrValueAdd(Map<String, String> in) + { + Set<String> out = new HashSet<String>(); + for (String s : in.keySet()) + out.add(s); + + for (String s : in.values()) + out.add(s); + + return out; + } + + public void testMemberSet() { + for (String s : in) + out.add(s); + } + + public Set<String> testFromArray(String[] in) { + Set<String> out = new HashSet<String>(); + for (String s : in) + out.add(s); + + return out; + } +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |