01: /*
02: * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright
03: * notice. All rights reserved.
04: */
05: package org.terracotta.dso.views;
06:
07: public class AutolocksWrapper {
08: private LocksWrapper m_locks;
09: private AutolockWrapper[] children;
10:
11: AutolocksWrapper(LocksWrapper locks) {
12: m_locks = locks;
13: }
14:
15: AutolockWrapper[] createAutolockWrappers() {
16: int count = m_locks.sizeOfAutolockArray();
17:
18: children = new AutolockWrapper[count];
19: for (int i = 0; i < count; i++) {
20: children[i] = new AutolockWrapper(m_locks, i);
21: }
22:
23: return children;
24: }
25:
26: AutolockWrapper[] getChildren() {
27: return children;
28: }
29:
30: AutolockWrapper getChildAt(int index) {
31: return children != null ? children[index] : null;
32: }
33:
34: int sizeOfAutolockArray() {
35: return m_locks.sizeOfAutolockArray();
36: }
37:
38: public String toString() {
39: return "Autolocks";
40: }
41: }
|