public class MultipleObjectsBundle extends java.lang.Object implements ObjectBundle
Modifier and Type | Field and Description |
---|---|
private java.util.List<java.util.List<?>> |
columns
Storing the real contents.
|
private ArrayDBIDs |
ids
DBIDs for these objects, but may be null.
|
private static Logging |
LOG
Class logger.
|
private BundleMeta |
meta
Storing the meta data.
|
Constructor and Description |
---|
MultipleObjectsBundle()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
MultipleObjectsBundle |
appendColumn(SimpleTypeInformation<?> type,
java.util.List<?> data)
Helper to add a single column to the bundle.
|
void |
appendSimple(java.lang.Object... data)
Append a new record to the data set.
|
boolean |
assignDBID(int onum,
DBIDVar var)
Assign the object DBID to a variable
|
BundleStreamSource |
asStream()
Process this bundle as stream.
|
java.lang.Object |
data(int onum,
int rnum)
Access a particular object and representation.
|
int |
dataLength()
Get the number of objects contained.
|
static MultipleObjectsBundle |
fromStream(BundleStreamSource source)
Convert an object stream to a bundle
|
java.util.List<?> |
getColumn(int i)
Get the raw objects columns.
|
ArrayDBIDs |
getDBIDs()
Get the DBIDs, may be
null . |
java.lang.Object[] |
getRow(int row)
Get an object row.
|
static <V> MultipleObjectsBundle |
makeSimple(SimpleTypeInformation<? super V> type,
java.util.List<? extends V> data)
Helper to add a single column to the bundle.
|
static <V1,V2> MultipleObjectsBundle |
makeSimple(SimpleTypeInformation<? super V1> type1,
java.util.List<? extends V1> data1,
SimpleTypeInformation<? super V2> type2,
java.util.List<? extends V2> data2)
Helper to add a single column to the bundle.
|
static <V1,V2,V3> MultipleObjectsBundle |
makeSimple(SimpleTypeInformation<? super V1> type1,
java.util.List<? extends V1> data1,
SimpleTypeInformation<? super V2> type2,
java.util.List<? extends V2> data2,
SimpleTypeInformation<? super V3> type3,
java.util.List<? extends V3> data3)
Helper to add a single column to the bundle.
|
BundleMeta |
meta()
Access the meta data.
|
SimpleTypeInformation<?> |
meta(int i)
Access the meta data.
|
int |
metaLength()
Get the metadata length.
|
void |
setDBIDs(ArrayDBIDs ids)
Set the DBID range for this bundle.
|
private static final Logging LOG
private BundleMeta meta
private java.util.List<java.util.List<?>> columns
private ArrayDBIDs ids
public BundleMeta meta()
ObjectBundle
meta
in interface ObjectBundle
public SimpleTypeInformation<?> meta(int i)
ObjectBundle
meta
in interface ObjectBundle
i
- componentpublic int metaLength()
ObjectBundle
metaLength
in interface ObjectBundle
public java.lang.Object data(int onum, int rnum)
ObjectBundle
data
in interface ObjectBundle
onum
- Object numberrnum
- Representation numberpublic boolean assignDBID(int onum, DBIDVar var)
ObjectBundle
assignDBID
in interface ObjectBundle
onum
- Object numbervar
- Variablefalse
if there was no predefined DBID.public int dataLength()
ObjectBundle
dataLength
in interface ObjectBundle
public void appendSimple(java.lang.Object... data)
data
- Data to appendpublic MultipleObjectsBundle appendColumn(SimpleTypeInformation<?> type, java.util.List<?> data)
type
- Type informationdata
- Data to addpublic void setDBIDs(ArrayDBIDs ids)
ids
- DBIDspublic ArrayDBIDs getDBIDs()
null
.public java.util.List<?> getColumn(int i)
i
- column numberpublic static <V> MultipleObjectsBundle makeSimple(SimpleTypeInformation<? super V> type, java.util.List<? extends V> data)
V
- Object typetype
- Type informationdata
- Data to addpublic static <V1,V2> MultipleObjectsBundle makeSimple(SimpleTypeInformation<? super V1> type1, java.util.List<? extends V1> data1, SimpleTypeInformation<? super V2> type2, java.util.List<? extends V2> data2)
V1
- First Object typeV2
- Second Object typetype1
- Type informationdata1
- Data column to addtype2
- Second Type informationdata2
- Second data column to addpublic static <V1,V2,V3> MultipleObjectsBundle makeSimple(SimpleTypeInformation<? super V1> type1, java.util.List<? extends V1> data1, SimpleTypeInformation<? super V2> type2, java.util.List<? extends V2> data2, SimpleTypeInformation<? super V3> type3, java.util.List<? extends V3> data3)
V1
- First Object typeV2
- Second Object typeV3
- Third Object typetype1
- First type informationdata1
- First data column to addtype2
- Second type informationdata2
- Second data column to addtype3
- Third type informationdata3
- Third data column to addpublic BundleStreamSource asStream()
public static MultipleObjectsBundle fromStream(BundleStreamSource source)
source
- Object streampublic java.lang.Object[] getRow(int row)
row
- Row numberCopyright © 2019 ELKI Development Team. License information.