View Javadoc

1   package org.apache.log4j.chainsaw.favourites;
2   
3   /***
4    * A Fauvourite is just a named container of on object that can be used
5    * as a basis (prototype) for the creation of exact copies.
6    * 
7    * Clients should use the FavouritesRegistry to create instances of this class
8    * so that explicit checks can be performed about the suitability of the
9    * prototype.
10   * 
11   * @author Paul Smith <psmith@apache.org>
12   *
13   */
14  public final class Favourite {
15  
16      private String name;
17      private Object prototype;
18  
19      /***
20       * @param name
21       * @param object
22       */
23      Favourite(String name, Object prtotype) {
24          this.name = name;
25          this.prototype = prtotype;
26      }
27  
28  
29      /***
30       * @return Returns the name.
31       */
32      public final String getName() {
33  
34          return name;
35      }
36  
37      /***
38       * Returns the object that would be used as a basis to create new
39       * instances of that same object.
40       * @return Returns the prototype.
41       */
42      public final Object getPrototype() {
43        return prototype;
44      }
45  }