Class DummyFactory

java.lang.Object
com.nt.udc.util.DummyFactory
All Implemented Interfaces:
Factory

public class DummyFactory extends Object implements Factory
In some situations, there may be a class that requires a Factory, but needs a "passthrough" getObject method that just returns itself. As an example, the FileHashtable may want to store the key that it uses as a key. Therefore, when the table rebuilds, it doesn't want to re-create a key from the stored object - it just wants the object itself.
  • Constructor Details

    • DummyFactory

      public DummyFactory()
  • Method Details

    • getObject

      public Object getObject(Object obj)
      Description copied from interface: Factory
      Returns an Object based on the specific input data.
      Specified by:
      getObject in interface Factory
      Parameters:
      obj - Data used to create the returned Object.
      Returns:
      Newly created Object, or null if no Object can currently be created.