From Documentation

Jump to: navigation, search




For OOP programming, you have to define a DataSource interface:

DataSource.java

 package test;
 
 public interface DataSource
 {
   java.util.List getElementsList();
 }

and its implementation:

DataSourceImpl.java

 package test;
 
 import java.util.*;
 
 public class DataSourceImpl implements DataSource
 {
   public List getElementsList()
   {
        List list = new ArrayList();
         list.add("Tom");
         list.add("Henri");
         list.add("Jim");
         
         return list;
   }
 }



Copyright © Potix Corporation. This article is licensed under GNU Free Documentation License.