org.opensha.commons.eq.cat
Class MutableCatalog

java.lang.Object
  extended by org.opensha.commons.eq.cat.DefaultCatalog
      extended by org.opensha.commons.eq.cat.MutableCatalog
All Implemented Interfaces:
Catalog

public class MutableCatalog
extends DefaultCatalog

Mutable version of a DefaultCatalog. Calls to getData() will return references to this catalogs underlying data arrays. Likewise, methods such as writeCatalog() which rely on getData() will be faster.

Version:
$Id: MutableCatalog.java 7478 2011-02-15 04:56:25Z pmpowers $
Author:
Peter Powers

Field Summary
 
Fields inherited from interface org.opensha.commons.eq.cat.Catalog
MAX_SIZE
 
Constructor Summary
MutableCatalog()
          Constructs a new empty mutable catalog.
MutableCatalog(File file, CatalogReader reader)
          Constructs a new mutable catalog from the given file using the specified reader.
 
Method Summary
 
Methods inherited from class org.opensha.commons.eq.cat.DefaultCatalog
addData, clone, contains, copyData, deriveCatalog, deriveData, getBoundsData, getData, getDataTypes, getDate, getEventID, getEventString, getEventStringWithID, getTime, getValue, maxDate, maxForType, minDate, minForType, readable, readCatalog, setReadable, size, writeCatalog, writeCatalog
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MutableCatalog

public MutableCatalog()
Constructs a new empty mutable catalog. Catalog size (event count) is set using the first data array added.


MutableCatalog

public MutableCatalog(File file,
                      CatalogReader reader)
               throws IOException
Constructs a new mutable catalog from the given file using the specified reader.

Parameters:
file - to read
reader - to process file
Throws:
IOException - if any IO or data processing related error occurs