Package org.marc4j.marc
Class Collection
- java.lang.Object
-
- org.marc4j.marc.Collection
-
- All Implemented Interfaces:
Serializable
public class Collection extends Object implements Serializable
Collection
defines behaviour for a collection ofRecord
objects.- Author:
- Bas Peters
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Collection()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(Record record)
Record
getRecord(int index)
Returns the Record object for the given index.int
getSize()
Returns the number of records in the collection.void
marshal(Writer out)
Marshals all the records in the collection and writes the tape format records to the Writer object.String
toString()
-
-
-
Method Detail
-
add
public void add(Record record)
-
getRecord
public Record getRecord(int index)
Returns the Record object for the given index.
- Parameters:
index
- the index of the record object- Returns:
- Record the
Record
object
-
getSize
public int getSize()
Returns the number of records in the collection.
- Returns:
- int the number of records in the collection
-
marshal
public void marshal(Writer out) throws IOException, MarcException
Marshals all the records in the collection and writes the tape format records to the Writer object.
- Parameters:
out
- theWriter
object- Throws:
IOException
MarcException
-
-