public final class StructUtil extends Object
Constructor and Description |
---|
StructUtil() |
Modifier and Type | Method and Description |
---|---|
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<Map.Entry<String,Object>> |
entrySet(Struct sct) |
static int |
getType(MapPro m) |
static String |
keyHash(Struct sct)
creates a hash based on the keys of the Map/Struct
|
static Set<String> |
keySet(Struct sct) |
static Struct |
merge(Struct[] scts) |
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
|
public StructUtil()
public static void copy(Struct source, Struct target, boolean overwrite)
source
- target
- overwrite
- overwrite data if exist in targetpublic static Collection.Key[] toCollectionKeys(String[] skeys)
public static DumpTable toDumpTable(Struct sct, String title, PageContext pageContext, int maxlevel, DumpProperties dp)
public static Collection<?> values(Struct sct)
sct
- public static Struct copyToStruct(Map map) throws PageException
PageException
public static long sizeOf(Struct sct)
sct
- public static void setELIgnoreWhenNull(Struct sct, String key, Object value)
public static void setELIgnoreWhenNull(Struct sct, Collection.Key key, Object value)
public static void removeValue(Map map, Object value)
map
- obj
- Copyright © 2015 Lucee