1 package org.vectomatic.dom.svg;
2
3
4
5
6
7 public class OMCSSValueList extends OMCSSValue {
8 protected OMCSSValue[] items;
9
10
11
12
13 public OMCSSValueList(OMCSSValue[] items, String cssText) {
14 super(CSS_VALUE_LIST);
15 this.items = items;
16 this.cssText = cssText;
17 }
18
19
20
21
22
23
24
25 public int getLength() {
26 return items != null ? items.length : 0;
27 }
28
29
30
31
32
33
34
35
36 public OMCSSValue getItem(int index) {
37 return (items != null && index >= 0 && index < items.length) ? items[index] : null;
38 }
39
40 @Override
41 public String getDescription() {
42 StringBuilder builder = new StringBuilder("OMCSSValueList(cssValueType=");
43 builder.append(cssValueType);
44 builder.append(", cssText=");
45 builder.append(cssText);
46 builder.append("{");
47 if (items != null) {
48 for (int i = 0; i < items.length; i ++) {
49 if (i > 0) {
50 builder.append(",");
51 }
52 builder.append(items[i].getDescription());
53 }
54 }
55 builder.append("})");
56 return builder.toString();
57 }
58 }