Package com.tangosol.io.pof
Class ValidatingPofHandler.Complex
java.lang.Object
com.tangosol.util.Base
com.tangosol.io.pof.ValidatingPofHandler.Complex
- Direct Known Subclasses:
ValidatingPofHandler.ComplexMap
- Enclosing class:
ValidatingPofHandler
A Complex object represents the current complex data structure in the
POF stream.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.tangosol.util.Base
Base.LoggingWriter
-
Field Summary
-
Constructor Summary
ConstructorDescriptionComplex
(ValidatingPofHandler.Complex complexCurrent, int cElements, boolean fContiguous) Construct a Complex object for a data collection or user type.Complex
(ValidatingPofHandler.Complex complexCurrent, int cElements, boolean fContiguous, int nUniformTypeId) Construct a Complex object for a uniformly-typed data collection. -
Method Summary
Modifier and TypeMethodDescriptionvoid
checkPosition
(int iPos) Notify the Complex object that a value has been encountered.int
Obtain the total element count.int
Obtain the last known position, which is the index (or property number) of the most recent value.int
For complex values with contiguous values, obtain the next position.int
If the object encoding is using uniform encoding, obtain the type id of the uniform type.boolean
Determine if the elements are contiguous.boolean
Determine if the object encoding within the Complex type is uniform.pop()
Pop this Complex object off the stack, returning the outer Complex object or null if there is none.Methods inherited from class com.tangosol.util.Base
azzert, azzert, azzert, azzertFailed, breakLines, breakLines, capitalize, checkNotEmpty, checkNotNull, checkRange, computeSafeWaitTime, decimalValue, dup, dup, ensureBigDecimal, ensureClassLoader, ensureRuntimeException, ensureRuntimeException, equals, equalsDeep, err, err, err, err, err, escape, formatDateTime, getCallerStackFrame, getCommonMonitor, getCommonMonitor, getCommonMonitor, getContextClassLoader, getContextClassLoader, getDeepMessage, getErr, getLastSafeTimeMillis, getLog, getMaxDecDigits, getMaxHexDigits, getOriginalException, getOut, getProcessRandom, getRandom, getRandomBinary, getRandomBinary, getRandomString, getSafeTimeMillis, getStackFrame, getStackFrames, getStackTrace, getStackTrace, getStackTrace, getThreadFactory, getTimeZone, getUpTimeMillis, hashCode, hexValue, indentString, indentString, isDecimal, isHex, isLogEcho, isOctal, log, log, log, log, log, makeInteger, makeLong, makeThread, mergeArray, mergeBooleanArray, mergeByteArray, mergeCharArray, mergeDoubleArray, mergeFloatArray, mergeIntArray, mergeLongArray, mod, mod, octalValue, out, out, out, out, out, pad, parseBandwidth, parseBandwidth, parseDelimitedString, parseHex, parseHex, parseMemorySize, parseMemorySize, parsePercentage, parseTime, parseTime, parseTimeNanos, parseTimeNanos, printStackTrace, randomize, randomize, randomize, randomize, read, read, read, read, read, read, read, replace, setErr, setLog, setLogEcho, setOut, sleep, toBandwidthString, toBandwidthString, toCharEscape, toCrc, toCrc, toCrc, toCrc, toCrc, toDecString, toDelimitedString, toDelimitedString, toDelimitedString, toDelimitedString, toHex, toHex, toHexDump, toHexEscape, toHexEscape, toHexEscape, toHexEscape, toHexString, toMemorySizeString, toMemorySizeString, toQuotedCharEscape, toQuotedStringEscape, toSqlString, toString, toString, toStringEscape, toUnicodeEscape, trace, trace, trace, trace, trace, trace, trace, trace, trace, truncateString, truncateString, wait
-
Constructor Details
-
Complex
Construct a Complex object for a data collection or user type.- Parameters:
complexCurrent
- the current Complex object or nullcElements
- the total (or maximum) number of elementsfContiguous
- true if the elements are contiguous
-
Complex
public Complex(ValidatingPofHandler.Complex complexCurrent, int cElements, boolean fContiguous, int nUniformTypeId) Construct a Complex object for a uniformly-typed data collection.- Parameters:
complexCurrent
- the current Complex object or nullcElements
- the total (or maximum) number of elementsfContiguous
- true if the elements are contiguousnUniformTypeId
- the type identifier of the uniform type
-
-
Method Details
-
checkPosition
public void checkPosition(int iPos) Notify the Complex object that a value has been encountered.- Parameters:
iPos
- the position that accomponied the value
-
getLastPosition
public int getLastPosition()Obtain the last known position, which is the index (or property number) of the most recent value.- Returns:
- the previous position that was reported to checkPosition()
-
getNextPosition
public int getNextPosition()For complex values with contiguous values, obtain the next position.- Returns:
- the next position
-
getElementCount
public int getElementCount()Obtain the total element count. The element count is not known (i.e. it is not limited) for user types. For sparse types, the element count is the maximum number of values in the sparse value, which is often greater than the actual number of values. For Map types, the number of values is two times the element count (since each element has a key and a value).- Returns:
- the maximum element count
-
isContiguous
public boolean isContiguous()Determine if the elements are contiguous.- Returns:
- true for all complex types except user and sparse types
-
isUniform
public boolean isUniform()Determine if the object encoding within the Complex type is uniform.- Returns:
- true iff values within the Complex type are of a uniform type and are encoded uniformly
-
getUniformType
public int getUniformType()If the object encoding is using uniform encoding, obtain the type id of the uniform type.- Returns:
- the type id used for the uniform encoding
-
pop
Pop this Complex object off the stack, returning the outer Complex object or null if there is none.- Returns:
- the outer Complex object or null if there is none
-