KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > example > MovieFinderImpl


1 package example;
2
3 import java.util.List JavaDoc;
4 import java.util.ArrayList JavaDoc;
5
6 public class MovieFinderImpl implements MovieFinder {
7   private ArrayList JavaDoc _list = new ArrayList JavaDoc();
8
9   /**
10    * Adds a movie to the list.
11    */

12   public void addMovie(Movie movie)
13   {
14     _list.add(movie);
15   }
16   
17   /**
18    * Returns all the movies.
19    */

20   public List JavaDoc findAll()
21   {
22     return new ArrayList JavaDoc(_list);
23   }
24 }
25
Popular Tags