1[[bbv2.reference.class.property-set]]
2= Class property-set
3
4Class for storing a set of properties.
5
6[source,jam]
7----
8class property-set {
9    rule raw ( )
10    rule str ( )
11    rule propagated ( )
12    rule add ( ps )
13    rule add-raw ( properties * )
14    rule refine ( ps )
15    rule get ( feature )
16}
17----
18
19There is 1<->1 correspondence between identity and value. No two
20instances of the class are equal. To maintain this property, the
21'property-set.create' rule should be used to create new instances.
22Instances are immutable.
23
24--
251. `rule raw ( )`
26+
27Returns a Jam list of the stored properties.
28
292. `rule str ( )`
30+
31Returns the string representation of the stored properties.
32
333. `rule propagated ( )`
34+
35Returns a link:#bbv2.reference.class.property-set[property-set]
36containing all the
37link:#bbv2.reference.features.attributes.propagated[propagated]
38properties in this
39link:#bbv2.reference.class.property-set[property-set].
40
414. [[bbv2.reference.class.property-set.add]] `rule add ( ps )`
42+
43Returns a new link:#bbv2.reference.class.property-set[property-set]
44containing the union of the properties in this
45link:#bbv2.reference.class.property-set[property-set] and in `ps`.
46+
47NOTE: If `ps` contains non-free properties that should override the values in
48this object, use link:#bbv2.reference.class.property-set.refine[refine]
49instead.
50
515. `rule add-raw ( properties * )`
52+
53Link link:#bbv2.reference.class.property-set.add[add], except that it
54takes a list of properties instead of a
55link:#bbv2.reference.class.property-set[property-set].
56
576. [[bbv2.reference.class.property-set.refine]] `rule refine ( ps )`
58+
59Refines properties by overriding any non-free and non-conditional
60properties for which a different value is specified in `ps`. Returns the
61resulting link:#bbv2.reference.class.property-set[property-set].
62
637. `rule get ( feature )`
64+
65Returns all the values of `feature`.
66--
67