001/** 002 * 003 * Copyright (c) 2014, the Railo Company Ltd. All rights reserved. 004 * 005 * This library is free software; you can redistribute it and/or 006 * modify it under the terms of the GNU Lesser General Public 007 * License as published by the Free Software Foundation; either 008 * version 2.1 of the License, or (at your option) any later version. 009 * 010 * This library is distributed in the hope that it will be useful, 011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 013 * Lesser General Public License for more details. 014 * 015 * You should have received a copy of the GNU Lesser General Public 016 * License along with this library. If not, see <http://www.gnu.org/licenses/>. 017 * 018 **/ 019package lucee.runtime.type.trace; 020 021import java.util.Map; 022import java.util.Set; 023 024import lucee.runtime.debug.Debugger; 025import lucee.runtime.op.Duplicator; 026import lucee.runtime.type.Collection; 027import lucee.runtime.type.Struct; 028 029public class TOStruct extends TOCollection implements Struct { 030 031 private static final long serialVersionUID = 4868199372417392722L; 032 private Struct sct; 033 034 protected TOStruct(Debugger debugger,Struct sct,int type,String category,String text) { 035 super(debugger,sct, type, category, text); 036 this.sct=sct; 037 } 038 039 public boolean isEmpty() { 040 log(null); 041 return sct.isEmpty(); 042 } 043 044 public boolean containsKey(Object key) { 045 log(null); 046 return sct.containsKey(key); 047 } 048 049 public boolean containsValue(Object value) { 050 log(null); 051 return sct.containsValue(value); 052 } 053 054 public Object get(Object key) { 055 log(null); 056 return sct.get(key); 057 } 058 059 public Object put(Object key, Object value) { 060 log(null); 061 return sct.put(key, value); 062 } 063 064 public Object remove(Object key) { 065 log(null); 066 return sct.remove(key); 067 } 068 069 public void putAll(Map m) { 070 log(null); 071 sct.putAll(m); 072 } 073 074 public Set keySet() { 075 log(null); 076 return sct.keySet(); 077 } 078 079 public java.util.Collection values() { 080 log(null); 081 return sct.values(); 082 } 083 084 public Set entrySet() { 085 log(null); 086 return sct.entrySet(); 087 } 088 089 public Collection duplicate(boolean deepCopy) { 090 log(null); 091 return new TOStruct(debugger,(Struct)Duplicator.duplicate(sct,deepCopy), type, category, text); 092 } 093 094 @Override 095 public long sizeOf() { 096 log(null); 097 return sct.sizeOf(); 098 } 099 100 @Override 101 public java.util.Iterator<String> getIterator() { 102 return keysAsStringIterator(); 103 } 104 105}