View Javadoc

1   // Decompiled by DJ v3.10.10.93 Copyright 2007 Atanas Neshkov  Date: 8/25/2008 3:01:19 PM
2   // Home Page: http://members.fortunecity.com/neshkov/dj.html  http://www.neshkov.com/dj.html - Check often for new version!
3   // Decompiler options: packimports(3) 
4   // Source File Name:   StringInstanceFactory.java
5   
6   package net.sf.beanrunner.factory.impl;
7   
8   
9   import java.util.*;
10  
11  import net.sf.beanrunner.factory.InstanceFactory;
12  
13  public class StringInstanceFactory
14      implements InstanceFactory
15  {
16  
17      public StringInstanceFactory(int size)
18      {
19          set = new HashSet();
20          set.add(null);
21          set.add("");
22          set.add("mama");
23          byte bytes[] = new byte[size];
24          (new Random(0L)).nextBytes(bytes);
25          String string = new String(bytes);
26          set.add(string);
27      }
28  
29      public Iterator iterator()
30      {
31          return set.iterator();
32      }
33  
34      Set set;
35  }