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