public static Collection toCollection ( Object o ) throws PageException { if ( o instanceof Collection ) return ( Collection ) o ; else if ( o instanceof Node ) return XMLCaster . toXMLStruct ( ( Node ) o , false ) ; else if ( o instanceof Map ) { return MapAsStruct . toStruct ( ( Map ) o , true ) ; // StructImpl((Map)o); } else if ( o instanceof ObjectWrap ) { return toCollection ( ( ( ObjectWrap ) o ) . getEmbededObject ( ) ) ; } else if ( Decision . isArray ( o ) ) { return toArray ( o ) ; } throw new CasterException ( o , "collection" ) ; }
cast a Object to a Collection