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 of Record objects.

Version:
$Revision: 1.7 $
Author:
Bas Peters
See Also:
Serialized Form

Constructor Summary
Collection()
           
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Collection

public Collection()
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 - the Writer object
IOException
MarcException


Copyright 2001-2003 Bas Peters. All Rights Reserved.