de.lmu.ifi.dbs.elki.datasource.bundle
Class SingleObjectBundle

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.datasource.bundle.SingleObjectBundle
All Implemented Interfaces:
ObjectBundle

public class SingleObjectBundle
extends Object
implements ObjectBundle

This class represents a "packaged" object, which is a transfer container for objects e.g. from parsers to a database. It contains the object with multiple representations outside of any index structure.


Field Summary
private  List<Object> contents
          Storing the real contents.
private  BundleMeta meta
          Store the meta data.
 
Constructor Summary
SingleObjectBundle()
          Constructor.
SingleObjectBundle(BundleMeta meta, List<Object> contents)
          Constructor.
 
Method Summary
 void append(SimpleTypeInformation<?> meta, Object data)
          Append a single representation to the object.
 Object data(int rnum)
          Get the value of the ith component.
 Object data(int onum, int rnum)
          Access a particular object and representation.
 int dataLength()
          Get the number of objects contained.
 BundleMeta meta()
          Access the meta data.
 SimpleTypeInformation<?> meta(int i)
          Access the meta data.
 int metaLength()
          Get the metadata length.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

meta

private BundleMeta meta
Store the meta data.


contents

private List<Object> contents
Storing the real contents.

Constructor Detail

SingleObjectBundle

public SingleObjectBundle()
Constructor.


SingleObjectBundle

public SingleObjectBundle(BundleMeta meta,
                          List<Object> contents)
Constructor.

Parameters:
meta - Metadata
contents - Object values
Method Detail

meta

public BundleMeta meta()
Description copied from interface: ObjectBundle
Access the meta data.

Specified by:
meta in interface ObjectBundle
Returns:
metadata

meta

public SimpleTypeInformation<?> meta(int i)
Description copied from interface: ObjectBundle
Access the meta data.

Specified by:
meta in interface ObjectBundle
Parameters:
i - component
Returns:
metadata of component i

metaLength

public int metaLength()
Description copied from interface: ObjectBundle
Get the metadata length.

Specified by:
metaLength in interface ObjectBundle
Returns:
length of metadata

data

public Object data(int rnum)
Get the value of the ith component.

Parameters:
rnum - representation number
Returns:
value

dataLength

public int dataLength()
Description copied from interface: ObjectBundle
Get the number of objects contained.

Specified by:
dataLength in interface ObjectBundle
Returns:
Number of objects

data

public Object data(int onum,
                   int rnum)
Description copied from interface: ObjectBundle
Access a particular object and representation.

Specified by:
data in interface ObjectBundle
Parameters:
onum - Object number
rnum - Representation number
Returns:
Contained data

append

public void append(SimpleTypeInformation<?> meta,
                   Object data)
Append a single representation to the object.

Parameters:
meta - Meta for the representation
data - Data to append

Release 0.4.0 (2011-09-20_1324)