001 package railo.runtime.type; 002 003 import java.util.Iterator; 004 005 import railo.runtime.PageContext; 006 import railo.runtime.dump.DumpData; 007 import railo.runtime.dump.DumpProperties; 008 import railo.runtime.exp.PageException; 009 import railo.runtime.type.dt.DateTime; 010 import railo.runtime.type.util.StructSupport; 011 012 public final class CollectionStruct extends StructSupport implements ObjectWrap,Struct { 013 014 private final Collection coll; 015 016 public CollectionStruct(Collection coll) { 017 this.coll=coll; 018 } 019 020 /** 021 * @see java.util.Map#clear() 022 */ 023 public void clear() { 024 coll.clear(); 025 } 026 027 /** 028 * @see railo.runtime.type.Collection#containsKey(railo.runtime.type.Collection.Key) 029 */ 030 public boolean containsKey(Key key) { 031 return coll.containsKey(key); 032 } 033 034 /** 035 * @see railo.runtime.type.Collection#duplicate(boolean) 036 */ 037 public Collection duplicate(boolean deepCopy) { 038 return coll.duplicate(deepCopy); 039 } 040 041 042 /** 043 * @see railo.runtime.type.Collection#get(railo.runtime.type.Collection.Key) 044 */ 045 public Object get(Key key) throws PageException { 046 return coll.get(key); 047 } 048 049 /** 050 * @see railo.runtime.type.Collection#get(railo.runtime.type.Collection.Key, java.lang.Object) 051 */ 052 public Object get(Key key, Object defaultValue) { 053 return coll.get(key, defaultValue); 054 } 055 056 /** 057 * @see railo.runtime.type.Collection#keys() 058 */ 059 public Key[] keys() { 060 return coll.keys(); 061 } 062 063 /** 064 * @see railo.runtime.type.Collection#keysAsString() 065 */ 066 public String[] keysAsString() { 067 return coll.keysAsString(); 068 } 069 070 /** 071 * @see railo.runtime.type.Collection#remove(railo.runtime.type.Collection.Key) 072 */ 073 public Object remove(Key key) throws PageException { 074 return coll.remove(key); 075 } 076 077 /** 078 * @see railo.runtime.type.Collection#removeEL(railo.runtime.type.Collection.Key) 079 */ 080 public Object removeEL(Key key) { 081 return coll.removeEL(key); 082 } 083 084 /** 085 * @see railo.runtime.type.Collection#set(railo.runtime.type.Collection.Key, java.lang.Object) 086 */ 087 public Object set(Key key, Object value) throws PageException { 088 return coll.set(key, value); 089 } 090 091 /** 092 * @see railo.runtime.type.Collection#setEL(railo.runtime.type.Collection.Key, java.lang.Object) 093 */ 094 public Object setEL(Key key, Object value) { 095 return coll.setEL(key, value); 096 } 097 098 /** 099 * @see java.util.Map#size() 100 */ 101 public int size() { 102 return coll.size(); 103 } 104 105 /** 106 * @see railo.runtime.type.Iteratorable#keyIterator() 107 */ 108 public Iterator keyIterator() { 109 return coll.keyIterator(); 110 } 111 112 113 /** 114 * @see railo.runtime.dump.Dumpable#toDumpData(railo.runtime.PageContext, int, railo.runtime.dump.DumpProperties) 115 */ 116 public DumpData toDumpData(PageContext pageContext, int maxlevel,DumpProperties properties) { 117 return coll.toDumpData(pageContext, maxlevel, properties); 118 } 119 120 /** 121 * @see railo.runtime.op.Castable#castToBooleanValue() 122 */ 123 public boolean castToBooleanValue() throws PageException { 124 return coll.castToBooleanValue(); 125 } 126 127 /** 128 * @see railo.runtime.op.Castable#castToDoubleValue() 129 */ 130 public double castToDoubleValue() throws PageException { 131 return coll.castToDoubleValue(); 132 } 133 134 135 /** 136 * @see railo.runtime.op.Castable#castToDateTime() 137 */ 138 public DateTime castToDateTime() throws PageException { 139 return coll.castToDateTime(); 140 } 141 142 /** 143 * @see railo.runtime.op.Castable#castToString() 144 */ 145 public String castToString() throws PageException { 146 return coll.castToString(); 147 } 148 149 150 /** 151 * @see railo.runtime.op.Castable#compare(boolean) 152 */ 153 public int compareTo(boolean b) throws PageException { 154 return coll.compareTo(b); 155 } 156 157 /** 158 * @see railo.runtime.op.Castable#compareTo(railo.runtime.type.dt.DateTime) 159 */ 160 public int compareTo(DateTime dt) throws PageException { 161 return coll.compareTo(dt); 162 } 163 164 /** 165 * @see railo.runtime.op.Castable#compareTo(double) 166 */ 167 public int compareTo(double d) throws PageException { 168 return coll.compareTo(d); 169 } 170 171 /** 172 * @see railo.runtime.op.Castable#compareTo(java.lang.String) 173 */ 174 public int compareTo(String str) throws PageException { 175 return coll.compareTo(str); 176 } 177 178 /** 179 * @see railo.runtime.type.ObjectWrap#getEmbededObject(java.lang.Object) 180 */ 181 public Object getEmbededObject(Object defaultValue) { 182 return coll; 183 } 184 185 /** 186 * @see railo.runtime.type.ObjectWrap#getEmbededObject() 187 */ 188 public Object getEmbededObject() throws PageException { 189 return coll; 190 } 191 192 /** 193 * @return 194 */ 195 public Collection getCollection() { 196 return coll; 197 } 198 }