|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.TransferHandler
jigcell.compare.impl.Transferer
jigcell.compare.data.DataElement
jigcell.compare.data.EditableDataElement
jigcell.compare.data.TreeDataElement
jigcell.compare.data.PackedTreeDataElement
public class PackedTreeDataElement
An implementation of EditableDataElement that uses a red-black tree to store values. The tree keys are boxed. Each key can hold a pack of values so this structure uses less memory than SparseTreeDataElement for dense collections. The size of the pack is adjustable. PackedTreeDataElement does not protect against concurrent edits. The maximum number of values this element can contain is approximately 2^60, but is likely to fail before then.
This code is licensed under the DARPA BioCOMP Open Source License. See LICENSE for more details.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class jigcell.compare.data.EditableDataElement |
|---|
EditableDataElement.EditableDataElementDelegate |
| Nested classes/interfaces inherited from interface jigcell.compare.IDataElement |
|---|
IDataElement.Type |
| Field Summary | |
|---|---|
protected static java.lang.String |
MESSAGE_CHUNKSIZEERROR
Error message when the chunk size is too small |
protected static java.lang.String |
MESSAGE_LASTERROR
Error message when the last value in a pack is incorrect |
protected long |
size
Element packing size |
protected static int |
SIZE_DEFAULTPACK
Size of default element pack |
| Fields inherited from class jigcell.compare.data.TreeDataElement |
|---|
length, values |
| Fields inherited from class jigcell.compare.data.EditableDataElement |
|---|
DOUBLE_NaN, DOUBLE_NINFINITY, DOUBLE_PINFINITY, MESSAGE_PARSEBLOCKERROR, MESSAGE_PARSEERROR, MESSAGE_PARSEEXTRAERROR, MESSAGE_PARSELITERALERROR, PATTERN_FP, prototypeChild, TOKEN_ALL, TOKEN_BLOCKELEMENT, TOKEN_BLOCKEND, TOKEN_BLOCKSTART, TOKEN_LITERAL |
| Fields inherited from class jigcell.compare.data.DataElement |
|---|
lockCount, LONGPOOL, PATTERN_FALSE, PATTERN_NAN, PATTERN_NINFINITY, PATTERN_NINFINITY2, PATTERN_NULL, PATTERN_PINFINITY, PATTERN_PINFINITY2, PATTERN_TRUE, PATTERN_VOID, SIZE_LONGPOOL |
| Fields inherited from class jigcell.compare.impl.Transferer |
|---|
CSV_FOOTER, CSV_LINEPOSTPEND, CSV_LINEPREPEND, CSV_LINESEPARATOR, HTML_FOOTER, HTML_HEADPOSTPEND, HTML_HEADPREPEND, HTML_HEADSEPARATOR, HTML_LINEPOSTPEND, HTML_LINEPREPEND, HTML_LINESEPARATOR |
| Fields inherited from class javax.swing.TransferHandler |
|---|
COPY, COPY_OR_MOVE, MOVE, NONE |
| Constructor Summary | |
|---|---|
PackedTreeDataElement()
Creates a new data element backed by a tree with packed storage. |
|
PackedTreeDataElement(int size)
Creates a new data element with packed storage. |
|
| Method Summary | |
|---|---|
protected EditableDataElement |
constructNew()
Constructs a new element of the same type as this element. |
static IEditableDataElement |
createElement(java.io.Reader reader)
Generates a PackedTreeDataElement from streaming input. |
static IEditableDataElement |
createElementSafe(java.io.Reader reader)
Generates a PackedTreeDataElement from streaming input. |
protected java.lang.Object |
getDirect(long pos)
Gets the value at a position. |
protected long |
lastValue()
Finds the last defined value. |
protected void |
putDirect(long pos,
java.lang.Object value)
Sets the value at a position. |
protected void |
removeDirect(long pos)
Removes the value at a position. |
| Methods inherited from class jigcell.compare.data.TreeDataElement |
|---|
clear, getLength, getValues, isAvailable, memoryLock, memoryUnlock, setLengthDirect, setValue, setValues, unsetValue |
| Methods inherited from class jigcell.compare.data.EditableDataElement |
|---|
copyValue, createElement, createElement, createElement, createElementSafe, createElementSafe, createScalarElement, createScalarElement, createScalarElement, createScalarElement, forceSlice, forceSlice, forceSlice, forceSlice, getBooleanValue, getChecked, getIntegralValue, getListValue, getLiteralValue, getPrototypeChild, getRealValue, getType, getType, makeList, moveValue, putChecked, setPrototypeChild, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValueInterpreted, setValueInterpreted, swapValues |
| Methods inherited from class jigcell.compare.data.DataElement |
|---|
forceBooleanValue, forceBooleanValue, forceIntegralValue, forceIntegralValue, forceListValue, forceLiteralValue, forceLiteralValue, forceRealValue, forceRealValue, forceSlice, getBooleanValue, getIntegralValue, getLiteralValue, getLongObject, getRealValue, getSlice, getSlice, getSlice, getSlice, getSlice, getTransferData, isScalar, isSpecialNonNumeric, toString, toString, toString, toString, toString, toString, toString, toString, toString, toString, toString, toString, toString, toString, toString, toString |
| Methods inherited from class jigcell.compare.impl.Transferer |
|---|
addExtension, addFlavor, createCSVTable, createFormattedTable, createHTMLTable, getExceptionRecorder, getExpectedClasses, getExpectedClasses, getExpectedClasses, getFlavors, getFlavors, getPreferredExtensions, getPreferredExtensions, getTransferClass, getTransferDataFlavors, getTransferFlavor, isDataFlavorSupported, transfer |
| Methods inherited from class javax.swing.TransferHandler |
|---|
canImport, createTransferable, exportAsDrag, exportDone, exportToClipboard, getCopyAction, getCutAction, getPasteAction, getSourceActions, getVisualRepresentation, importData |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface jigcell.compare.IDataElement |
|---|
forceBooleanValue, forceBooleanValue, forceIntegralValue, forceIntegralValue, forceListValue, forceLiteralValue, forceLiteralValue, forceRealValue, forceRealValue, forceSlice, getBooleanValue, getIntegralValue, getLiteralValue, getRealValue, getSlice, getSlice, getSlice, getSlice, getSlice, isScalar, toString, toString, toString, toString, toString, toString, toString |
| Methods inherited from interface java.awt.datatransfer.Transferable |
|---|
getTransferData, getTransferDataFlavors, isDataFlavorSupported |
| Field Detail |
|---|
protected static final int SIZE_DEFAULTPACK
protected static final java.lang.String MESSAGE_CHUNKSIZEERROR
protected static final java.lang.String MESSAGE_LASTERROR
protected long size
| Constructor Detail |
|---|
public PackedTreeDataElement()
public PackedTreeDataElement(int size)
size - Pack size| Method Detail |
|---|
public static IEditableDataElement createElement(java.io.Reader reader)
reader - Readerpublic static IEditableDataElement createElementSafe(java.io.Reader reader)
reader - Readerprotected EditableDataElement constructNew()
constructNew in class EditableDataElementprotected java.lang.Object getDirect(long pos)
getDirect in class EditableDataElementpos - Positionprotected long lastValue()
lastValue in class TreeDataElement
protected void putDirect(long pos,
java.lang.Object value)
putDirect in class EditableDataElementpos - Positionvalue - Valueprotected void removeDirect(long pos)
removeDirect in class EditableDataElementpos - Position
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||