O'Reilly logo

Joy of Patterns: Using Patterns for Enterprise Development, The by Brandon Goldfedder

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

PartList.java

package ProductConfig;
import java.util.*;
public class PartList
{
public PartList()
{
    m_partList = new Hashtable();
}

public Part getPart(String name)
{
    return (Part)(m_partList.get(name));
}

public void addPart(Part part)
{
    m_partList.put(part.getName(),part);
}
public void removePart(Part part)
{
    m_partList.remove(part.getName());
}

private Hashtable m_partList;
}

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required