01: /*
02: * $RCSfile: ProductOperationGraph.java,v $
03: *
04: * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved.
05: *
06: * Use is subject to license terms.
07: *
08: * $Revision: 1.1 $
09: * $Date: 2005/02/11 04:57:16 $
10: * $State: Exp $
11: */
12: package javax.media.jai;
13:
14: import java.util.Enumeration;
15: import java.util.Vector;
16:
17: /**
18: * ProductOperationGraph manages a list of descriptors belonging to a
19: * particular product. The descriptors have pairwise preferences between
20: * them.
21: *
22: * This class extends "OperationGraph" which provide the
23: * other operations such as remove, lookup, set/unset preference etc.
24: *
25: * <p> This class is used by the implementation of the OperationRegistry
26: * class and is not intended to be part of the API.
27: *
28: * @see OperationGraph
29: *
30: * - Moved most of the functionality to "OperationGraph"
31: * which has been generalized to maintain product as well
32: * as factory tree
33: */
34: final class ProductOperationGraph extends OperationGraph implements
35: java.io.Serializable {
36:
37: /** Constructs an <code>ProductOperationGraph</code>. */
38: ProductOperationGraph() {
39: // Use the name of the PartialOrderNode for comparisions
40: super (true);
41: }
42:
43: /**
44: * Adds a product to an <code>ProductOperationGraph</code>. A new
45: * <code>PartialOrderNode</code> is constructed to hold the product
46: * and its graph adjacency information.
47: */
48: void addProduct(String productName) {
49: addOp(new PartialOrderNode(new OperationGraph(), productName));
50: }
51: }
|