storage.memory
Class BareSequence

java.lang.Object
  extended byorg.nodal.util.NodeFilter
      extended bystorage.memory.BareContent
          extended bystorage.memory.BareSequence
All Implemented Interfaces:
Content, Node, NodeContent, SequenceContent, SequenceNode, TxnMonitorable

public abstract class BareSequence
extends BareContent
implements SequenceNode


Nested Class Summary
 
Nested classes inherited from class storage.memory.BareContent
BareContent.Editor
 
Nested classes inherited from class org.nodal.model.SequenceNode
SequenceNode.Editor
 
Field Summary
protected  storage.memory.MemSequenceContentI seq
           
 
Fields inherited from class storage.memory.BareContent
c, cap, services, txnHandlers
 
Fields inherited from class org.nodal.util.NodeFilter
node
 
Method Summary
 Seq asSeq()
          Create and return the current contents of this container as a Seq.
 SequenceNode asSequenceNode()
          The Node's contents expressed as a Sequence.
 NodeContent.Editor edit()
          An Editor for changing the Content of this Node.
abstract  SequenceNode.Editor editSequence()
          Directly access SequenceEditor.
 java.lang.Object getItem(int index)
          Return the Object at the given index.
 boolean indexIsValid(int index)
          Check that a given index is valid.
 boolean isValidProperty(java.lang.Object prop)
          Check for the validity of a given property value.
 Getter item(int index)
          Return a Getter for the item at the given index.
 Getter range(int start, int end)
          Return a Getter for the sequence of items indexed from start to end, inclusive.
 java.lang.String toString()
           
 
Methods inherited from class storage.memory.BareContent
addTxnHandler, asAnchor, asMapNode, asRecordNode, capability, content, getValue, invert, notifyInsertAfter, notifyInsertBefore, notifyRemoveKey, notifyRemoveRange, notifyReplaceRange, notifySetValue, properties, removeTxnHandler, size, value
 
Methods inherited from class org.nodal.util.NodeFilter
bareNode, editMap, editRecord, history, id, path, repository, type
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.nodal.model.Content
getValue, invert, properties, size, type, value
 
Methods inherited from interface org.nodal.model.Node
asAnchor, asMapNode, asRecordNode, bareNode, capability, content, editMap, editRecord, history, id, path, repository, type
 
Methods inherited from interface org.nodal.model.TxnMonitorable
addTxnHandler, removeTxnHandler
 

Field Detail

seq

protected final storage.memory.MemSequenceContentI seq
Method Detail

asSequenceNode

public SequenceNode asSequenceNode()
Description copied from interface: Node
The Node's contents expressed as a Sequence. This is a shortcut for content().asSequence().

Specified by:
asSequenceNode in interface Node
Overrides:
asSequenceNode in class BareContent

isValidProperty

public boolean isValidProperty(java.lang.Object prop)
Description copied from interface: Content
Check for the validity of a given property value.

Specified by:
isValidProperty in interface Content
Parameters:
prop - the property to be checked
Returns:
true if that value can be used as a property of this Node

asSeq

public Seq asSeq()
Description copied from interface: SequenceContent
Create and return the current contents of this container as a Seq. The subtype of this Seq will depend on the type of content. e.g a type will return a ByteSeq object.

Specified by:
asSeq in interface SequenceContent
Returns:
a Seq object apprpriate to the type.

item

public Getter item(int index)
            throws IndexBoundsException
Description copied from interface: SequenceContent
Return a Getter for the item at the given index.

Specified by:
item in interface SequenceContent
Throws:
IndexBoundsException

getItem

public final java.lang.Object getItem(int index)
                               throws IndexBoundsException
Description copied from interface: SequenceContent
Return the Object at the given index.

Specified by:
getItem in interface SequenceContent
Throws:
IndexBoundsException

indexIsValid

public boolean indexIsValid(int index)
Description copied from interface: SequenceContent
Check that a given index is valid.

Specified by:
indexIsValid in interface SequenceContent
Parameters:
index - the index
Returns:
true if this is a valid point to get/set a value

range

public Getter range(int start,
                    int end)
             throws IndexBoundsException
Description copied from interface: SequenceContent
Return a Getter for the sequence of items indexed from start to end, inclusive.

The value returned by the Getter is an instance of org.nodal.util.Seq.

Specified by:
range in interface SequenceContent
Throws:
IndexBoundsException
See Also:
Seq

edit

public final NodeContent.Editor edit()
Description copied from interface: Node
An Editor for changing the Content of this Node. If the Capability does not provide write access, then this will return null.

Specified by:
edit in interface Node
Specified by:
edit in class BareContent

toString

public java.lang.String toString()

editSequence

public abstract SequenceNode.Editor editSequence()
Description copied from interface: SequenceNode
Directly access SequenceEditor.

Specified by:
editSequence in interface SequenceNode
Overrides:
editSequence in class NodeFilter