railo.runtime.type.util
Class StructUtil

java.lang.Object
  extended by railo.runtime.type.util.StructUtil

public final class StructUtil
extends Object


Constructor Summary
StructUtil()
           
 
Method Summary
static void copy(Struct source, Struct target, boolean overwrite)
          copy data from source struct to target struct
static Struct copyToStruct(Map map)
           
static Struct duplicate(Struct sct, boolean deepCopy)
           
static Set entrySet(Struct sct)
           
static Set keySet(Struct sct)
           
static void putAll(Struct struct, Map map)
           
static void removeValue(Map map, Object value)
          remove every entry hat has this value
static void setELIgnoreWhenNull(Struct sct, Collection.Key key, Object value)
           
static void setELIgnoreWhenNull(Struct sct, String key, Object value)
           
static long sizeOf(Struct sct)
          return the size of given struct, size of values + keys
static Collection.Key[] toCollectionKeys(String[] skeys)
           
static DumpTable toDumpTable(Struct sct, String title, PageContext pageContext, int maxlevel, DumpProperties dp)
           
static Collection values(Struct sct)
          create a value return value out of a struct
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StructUtil

public StructUtil()
Method Detail

copy

public static void copy(Struct source,
                        Struct target,
                        boolean overwrite)
copy data from source struct to target struct

Parameters:
source -
target -
overwrite - overwrite data if exist in target

toCollectionKeys

public static Collection.Key[] toCollectionKeys(String[] skeys)

duplicate

public static Struct duplicate(Struct sct,
                               boolean deepCopy)
Parameters:
sct -
Returns:

putAll

public static void putAll(Struct struct,
                          Map map)

entrySet

public static Set entrySet(Struct sct)

keySet

public static Set keySet(Struct sct)

toDumpTable

public static DumpTable toDumpTable(Struct sct,
                                    String title,
                                    PageContext pageContext,
                                    int maxlevel,
                                    DumpProperties dp)

values

public static Collection values(Struct sct)
create a value return value out of a struct

Parameters:
sct -
Returns:

copyToStruct

public static Struct copyToStruct(Map map)
                           throws PageException
Throws:
PageException

sizeOf

public static long sizeOf(Struct sct)
return the size of given struct, size of values + keys

Parameters:
sct -
Returns:

setELIgnoreWhenNull

public static void setELIgnoreWhenNull(Struct sct,
                                       String key,
                                       Object value)

setELIgnoreWhenNull

public static void setELIgnoreWhenNull(Struct sct,
                                       Collection.Key key,
                                       Object value)

removeValue

public static void removeValue(Map map,
                               Object value)
remove every entry hat has this value

Parameters:
map -
obj -


Copyright © 2012 Railo