com.bigdata.btree.raba.codec
Class AbstractCodedRaba

java.lang.Object
  extended by com.bigdata.btree.raba.codec.AbstractCodedRaba
All Implemented Interfaces:
ICodedRaba, IRaba, Iterable<byte[]>
Direct Known Subclasses:
CanonicalHuffmanRabaCoder.CodedRabaImpl

public abstract class AbstractCodedRaba
extends Object
implements ICodedRaba

Abstract implementation throws UnsupportedOperationException for all mutation operations.

Version:
$Id: AbstractCodedRaba.java 2265 2009-10-26 12:51:06Z thompsonbry $
Author:
Bryan Thompson

Constructor Summary
protected AbstractCodedRaba()
           
 
Method Summary
 int add(byte[] a)
          Append a byte[] value to the end of the logical byte[][] (optional operation).
 int add(byte[] value, int off, int len)
          Append a byte[] value to the end of the logical byte[][] (optional operation).
 int add(DataInput in, int len)
          Append a byte[] value to the end of the logical byte[][] (optional operation).
 boolean isReadOnly()
          Implementation is read-only.
 Iterator<byte[]> iterator()
          Basic implementation may be overridden if a faster implementation is available.
 void set(int index, byte[] a)
          Set the byte[] value at the specified index (optional operation).
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.bigdata.btree.raba.codec.ICodedRaba
data
 
Methods inherited from interface com.bigdata.btree.raba.IRaba
capacity, copy, get, isEmpty, isFull, isKeys, isNull, length, search, size
 

Constructor Detail

AbstractCodedRaba

protected AbstractCodedRaba()
Method Detail

isReadOnly

public final boolean isReadOnly()
Implementation is read-only.

Specified by:
isReadOnly in interface IRaba

add

public final int add(byte[] a)
Description copied from interface: IRaba
Append a byte[] value to the end of the logical byte[][] (optional operation).

Specified by:
add in interface IRaba
Parameters:
a - A value.
Returns:
The #of values in the logical byte[][] (postcondition).

add

public final int add(byte[] value,
                     int off,
                     int len)
Description copied from interface: IRaba
Append a byte[] value to the end of the logical byte[][] (optional operation).

Specified by:
add in interface IRaba
Parameters:
value - A value
off - The offset of the first byte to be copied.
len - The #of bytes to be copied.
Returns:
The #of values in the logical byte[][] (postcondition).

add

public final int add(DataInput in,
                     int len)
              throws IOException
Description copied from interface: IRaba
Append a byte[] value to the end of the logical byte[][] (optional operation).

Specified by:
add in interface IRaba
Parameters:
in - The input stream from which the byte[] will be read.
len - The #of bytes to be read.
Returns:
The #of values in the logical byte[][] (postcondition).
Throws:
IOException

set

public final void set(int index,
                      byte[] a)
Description copied from interface: IRaba
Set the byte[] value at the specified index (optional operation).

Specified by:
set in interface IRaba
Parameters:
index - The index in [0:IRaba.size()-1].
a - The byte[] value.

toString

public final String toString()
Overrides:
toString in class Object

iterator

public Iterator<byte[]> iterator()
Basic implementation may be overridden if a faster implementation is available.

Specified by:
iterator in interface IRaba
Specified by:
iterator in interface Iterable<byte[]>


Copyright © 2006-2009 SYSTAP, LLC. All Rights Reserved.