Class WffBMObject
- All Implemented Interfaces:
 WffBMData,WffData,Serializable,Cloneable,Map<String,ValueValueType> 
The java object representation for JavaScript object. 
Sample code :-
 
Sample code :-
 WffBMObject bmObject = new WffBMObject();
 bmObject.put("serverKey", BMValueType.STRING, "value from server");
 bmObject.put("string", BMValueType.STRING, "sample string");
 bmObject.put("nul", BMValueType.NULL, null);
 bmObject.put("number", BMValueType.NUMBER, 555);
 bmObject.put("undef", BMValueType.UNDEFINED, null);
 bmObject.put("reg", BMValueType.REG_EXP, "[w]");
 bmObject.put("bool", BMValueType.BOOLEAN, true);
 bmObject.put("testFun", BMValueType.FUNCTION, "function(arg) {alert(arg);}");
 
 The WffBMObject can also hold array and binary data (as byte array).
 Check out WffBMArray and WffBMByteArray respectively.- See Also:
 
- 
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object>  - 
Constructor Summary
ConstructorsConstructorDescriptionWffBMObject(boolean outer) WffBMObject(byte[] bMBytes) WffBMObject(byte[] bMBytes, boolean outer)  - 
Method Summary
Modifier and TypeMethodDescriptionbyte[]build()Deprecated.building bytes implementation doesn't throw UnsupportedEncodingException so deprecated this method.byte[]build(boolean outer) Deprecated.building bytes implementation doesn't throw UnsupportedEncodingException so deprecated this method.byte[]replacement method for build() method.byte[]buildBytes(boolean outer) byte[]Deprecated.usegetBMBytes()byte[]getValueType(String key) booleanisOuter()voidput(String key, BMValueType valueType, Object value) put(String key, ValueValueType value) voidsetOuter(boolean outer) Methods inherited from class java.util.LinkedHashMap
clear, containsValue, entrySet, forEach, get, getOrDefault, keySet, removeEldestEntry, replaceAll, valuesMethods inherited from class java.util.HashMap
clone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, putAll, putIfAbsent, remove, remove, replace, replace, sizeMethods inherited from class java.util.AbstractMap
equals, hashCode, toStringMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, containsKey, equals, hashCode, isEmpty, merge, putAll, putIfAbsent, remove, remove, replace, replace, size 
- 
Constructor Details
- 
WffBMObject
public WffBMObject() - 
WffBMObject
public WffBMObject(boolean outer)  - 
WffBMObject
public WffBMObject(byte[] bMBytes)  - 
WffBMObject
public WffBMObject(byte[] bMBytes, boolean outer)  
 - 
 - 
Method Details
- 
put
- Specified by:
 putin interfaceMap<String,ValueValueType> - Overrides:
 putin classHashMap<String,ValueValueType> 
 - 
put
 - 
build
Deprecated.building bytes implementation doesn't throw UnsupportedEncodingException so deprecated this method. The same goal can be achieved using buildBytes method.- Returns:
 - Throws:
 UnsupportedEncodingException- throwing this exception will be removed in future version because its internal implementation will never make this exception due to the code changes since 3.0.1.- Since:
 - 1.1.5
 
 - 
buildBytes
public byte[] buildBytes()replacement method for build() method.- Returns:
 - Since:
 - 3.0.15
 
 - 
build
Deprecated.building bytes implementation doesn't throw UnsupportedEncodingException so deprecated this method. The same goal can be achieved using buildBytes method.NB: use buildBytes instead of this method.- Specified by:
 buildin interfaceWffBMData- Parameters:
 outer-- Returns:
 - the bytes representation of the object
 - Throws:
 UnsupportedEncodingException- throwing this exception will be removed in future version because its internal implementation will never make this exception due to the code changes since 3.0.1.- Since:
 - 1.1.5
 
 - 
buildBytes
public byte[] buildBytes(boolean outer) - Specified by:
 buildBytesin interfaceWffBMData- Parameters:
 outer-- Returns:
 - bytes for this WffBMObject
 - Since:
 - 3.0.2
 
 - 
getbMBytes
Deprecated.usegetBMBytes()- Returns:
 - the bmBytes
 
 - 
getBMBytes
public byte[] getBMBytes()- Returns:
 - the bmBytes
 - Since:
 - 3.0.16
 
 - 
isOuter
public boolean isOuter() - 
setOuter
public void setOuter(boolean outer)  - 
getValue
- Parameters:
 key- the key name- Since:
 - 2.0.0
 
 - 
getValueType
- Parameters:
 key-- Returns:
 - the value type of this key
 - Since:
 - 2.0.0
 
 - 
getBMType
 
 -