public class VinciFrame extends QueryableFrame
| Constructor and Description |
|---|
VinciFrame()
Create a new empty VinciFrame.
|
VinciFrame(int initialCapacity)
Create a new empty VinciFrame with the specified initial capacity.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(String key,
FrameComponent val)
Implementation of the abstract Frame method.
|
Frame |
createSubFrame(String tag_name,
int initialCapacity)
Override the createSubFrame to create a VinciFrame of precise capacity.
|
protected void |
ensureCapacity() |
VinciFrame |
fdrop(String key)
Remove all elements whose tag name matches the provided key (if any) from the top level of this
frame.
|
VinciFrame |
fdropFirst(String key)
Remove only the first element whose tag name matches the specified key (if any) from the top
level of this frame.
|
ArrayList |
fget(String key)
Implementation of the abstract fget method defined in QueryableFrame.
|
FrameComponent |
fgetFirst(String key)
Implementation of the abstract fgetFirst method defined in QueryableFrame.
|
VinciFrame |
fgetVinciFrame(String key)
Convenience method for fetching sub-frames when their type is known to be VinciFrame
|
ArrayList |
fkeys()
Returns a ArrayList of all the keys at the top-level of this frame, removing any duplicates.
|
void |
freset()
Reset this frame to an empty state.
|
VinciFrame |
fset(String key,
boolean val)
Change the value associated with the first occurence of the given key to val.
|
VinciFrame |
fset(String key,
byte[] bin)
Change the value associated with the first occurence of the given key to val.
|
VinciFrame |
fset(String key,
double val)
Change the value associated with the first occurence of the given key to val.
|
VinciFrame |
fset(String key,
Frame val)
Change the value associated with the first occurence of the given key to val.
|
VinciFrame |
fset(String key,
int val)
Change the value associated with the first occurence of the given key to val.
|
VinciFrame |
fset(String key,
int[] val)
Change the value associated with the first occurence of the given key to val.
|
VinciFrame |
fset(String key,
long val)
Change the value associated with the first occurence of the given key to val.
|
VinciFrame |
fset(String key,
String val)
Change the value associated with first occurence of the given key to val.
|
VinciFrame |
fsetTrueBinary(String key,
byte[] bin)
Change the value associated with the first occurence of the given key to val.
|
KeyValuePair |
getKeyValuePair(int which)
Implementation of the abstract Frame method.
|
int |
getKeyValuePairCount()
Implementation of the abstract Frame method.
|
static TransportableFactory |
getVinciFrameFactory()
Get a TransportableFactory that creates new VinciFrames.
|
protected void |
set(String key,
FrameComponent val)
Change the value associated with the first occurence of the given key to val.
|
boolean |
stripWhitespace()
Recursively strip any raw PCDATA fields that are entirely whitespace.
|
static VinciFrame |
toVinciFrame(Transportable t)
Create a VinciFrame that is a (deep) copy of the given transportable.
|
fgetBoolean, fgetBytes, fgetDouble, fgetDoubleArray, fgetFloat, fgetFloatArray, fgetFrame, fgetInt, fgetIntArray, fgetLong, fgetLongArray, fgetString, fgetStringArray, fgetTrueBinarycreateFrameLeaf, fadd, fadd, fadd, fadd, fadd, fadd, fadd, fadd, fadd, fadd, fadd, fadd, fadd, fadd, faddTrueBinary, fromStream, getFrameTransporter, setFrameTransporter, toRawXML, toRawXML, toRawXMLWork, toStream, toString, toXML, toXML, toXMLgetAttributes, setAttributespublic VinciFrame()
public VinciFrame(int initialCapacity)
initialCapacity - the capacity value to be passed on to the internal ArrayList used for holding
KeyValuePairs.public static TransportableFactory getVinciFrameFactory()
public static VinciFrame toVinciFrame(Transportable t)
t - -public ArrayList fkeys()
public ArrayList fget(String key)
fget in class QueryableFramekey - The key identifying the values to retrieve.public FrameComponent fgetFirst(String key)
fgetFirst in class QueryableFramekey - The key identifying the value to retrieve.public Frame createSubFrame(String tag_name, int initialCapacity)
createSubFrame in class Frametag_name - -initialCapacity - -public VinciFrame fgetVinciFrame(String key)
key - The key identifying the value to retrieve.ClassCastException - (unchecked) if the value was not of type VinciFrame.public VinciFrame fset(String key, String val)
key - -val - -NullPointerException - if val is null.public VinciFrame fset(String key, long val)
key - -val - -public VinciFrame fset(String key, boolean val)
key - -val - -public VinciFrame fset(String key, int val)
key - -val - -public VinciFrame fset(String key, int[] val)
key - -val - -public VinciFrame fset(String key, Frame val)
key - -val - -NullPointerException - if val is null.public VinciFrame fset(String key, double val)
key - -val - -public VinciFrame fset(String key, byte[] bin)
key - -bin - -NullPointerException - if bin is null.public VinciFrame fsetTrueBinary(String key, byte[] bin)
key - -bin - -NullPointerException - if bin is null.protected void set(String key, FrameComponent val)
key - -val - -NullPointerException - if val is null.public VinciFrame fdropFirst(String key)
key - The tag name of the element to remove.public VinciFrame fdrop(String key)
key - The tag name of the elements to remove.public void freset()
public void add(String key, FrameComponent val)
protected void ensureCapacity()
public KeyValuePair getKeyValuePair(int which)
getKeyValuePair in class Framewhich - The index of the KeyValuePair to retrieve.public int getKeyValuePairCount()
getKeyValuePairCount in class Framepublic boolean stripWhitespace()
Copyright © 2018. All rights reserved.