001 /** 002 * Implements the CFML Function structfind 003 */ 004 package railo.runtime.functions.struct; 005 006 import railo.runtime.PageContext; 007 import railo.runtime.exp.PageException; 008 import railo.runtime.ext.function.Function; 009 import railo.runtime.type.Collection; 010 import railo.runtime.type.KeyImpl; 011 import railo.runtime.type.Struct; 012 013 public final class StructFind implements Function { 014 public static Object call(PageContext pc , Struct struct, String key) throws PageException { 015 return struct.get(KeyImpl.init(key)); 016 } 017 public static Object call(PageContext pc , Struct struct, Collection.Key key) throws PageException { 018 return struct.get(key); 019 } 020 }