Package elki.database.relation
Class ConvertToStringView
- java.lang.Object
-
- elki.database.relation.ConvertToStringView
-
-
Constructor Summary
Constructors Constructor Description ConvertToStringView(Relation<?> existing)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Stringget(DBIDRef id)Get the representation of an object.SimpleTypeInformation<java.lang.String>getDataTypeInformation()Get the data type of this representationDBIDsgetDBIDs()Get the IDs the query is defined for.java.lang.StringgetLongName()Get a long (human readable) name for the relation.DBIDIteriterDBIDs()Get an iterator access to the DBIDs.intsize()Get the number of DBIDs.
-
-
-
Field Detail
-
existing
final Relation<?> existing
The database we use
-
-
Constructor Detail
-
ConvertToStringView
public ConvertToStringView(Relation<?> existing)
Constructor.- Parameters:
existing- Existing representation
-
-
Method Detail
-
get
public java.lang.String get(DBIDRef id)
Description copied from interface:RelationGet the representation of an object.
-
getDBIDs
public DBIDs getDBIDs()
Description copied from interface:RelationGet the IDs the query is defined for.If possible, prefer
Relation.iterDBIDs().
-
iterDBIDs
public DBIDIter iterDBIDs()
Description copied from interface:RelationGet an iterator access to the DBIDs.To iterate over all IDs, use the following code fragment:
for(DBIDIter iter = relation.iterDBIDs(); iter.valid(); iter.advance()) { relation.get(iter); // Get the current element }
-
size
public int size()
Description copied from interface:RelationGet the number of DBIDs.
-
getDataTypeInformation
public SimpleTypeInformation<java.lang.String> getDataTypeInformation()
Description copied from interface:RelationGet the data type of this representation- Specified by:
getDataTypeInformationin interfaceRelation<java.lang.String>- Returns:
- Data type
-
getLongName
public java.lang.String getLongName()
Description copied from interface:RelationGet a long (human readable) name for the relation.- Specified by:
getLongNamein interfaceRelation<java.lang.String>- Returns:
- Relation name
-
-