org.opensha.sha.earthquake.observedEarthquake
Class ObsEqkRupList

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.ArrayList<ObsEqkRupture>
              extended by org.opensha.sha.earthquake.observedEarthquake.ObsEqkRupList
All Implemented Interfaces:
Serializable, Cloneable, Iterable<ObsEqkRupture>, Collection<ObsEqkRupture>, List<ObsEqkRupture>, RandomAccess

public class ObsEqkRupList
extends ArrayList<ObsEqkRupture>
implements Serializable

Title: ObsEqkRupList

Description: This class provide capabilty of storing observed events as a list. Also defines the function using which user can extract a subset of the list based on Magnitude range, origin time or geographic Region. It also defines functions that allows user to Sort the list based on Mag, Origin Time.

Version:
1.0
Author:
Nitin Gupta, Vipin Gupta and Edward (Ned) Field
See Also:
Serialized Form

Field Summary
protected static String C
          Class name used for debugging purposes
protected static boolean D
          if true print out debugging statements
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
ObsEqkRupList()
           
 
Method Summary
 ObsEqkRupList getRupsAboveMag(double mag)
          Returns the list of the Observed events above/at the given magnitude.
 ObsEqkRupList getRupsAfter(long timeInMillis)
          Returns the list of Observed events after a given time in milliseconds (epoch)
 ObsEqkRupList getRupsBefore(long timeInMillis)
          Returns the list of Observed events before a given time in milliseconds (epoch)
 ObsEqkRupList getRupsBelowMag(double mag)
          Returns the list of the Observed events below the given magnitude.
 ObsEqkRupList getRupsBetween(long timeInMillis1, long timeInMillis2)
          Returns the list of the Observed events between 2 given time periods.
 ObsEqkRupList getRupsBetweenMag(double mag1, double mag2)
          Returns the list of the Observed events between 2 given magnitudes.
 ObsEqkRupList getRupsInside(Region region)
          Returns the list of the Observed events inside a given geographic region
 ObsEqkRupList getRupsOutside(Region region)
          Returns the list of the Observed events outside a given geographic region
 void sortByMag()
          Sorts the Observed Eqk Rupture Event list based on the magitude.
 void sortByOriginTime()
          Sorts the Observed Eqk Rupture Event list based on the Origin time.
 
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, removeRange, set, size, toArray, toArray, trimToSize
 
Methods inherited from class java.util.AbstractList
equals, hashCode, iterator, listIterator, listIterator, subList
 
Methods inherited from class java.util.AbstractCollection
containsAll, removeAll, retainAll, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
containsAll, equals, hashCode, iterator, listIterator, listIterator, removeAll, retainAll, subList
 

Field Detail

C

protected static final String C
Class name used for debugging purposes

See Also:
Constant Field Values

D

protected static final boolean D
if true print out debugging statements

See Also:
Constant Field Values
Constructor Detail

ObsEqkRupList

public ObsEqkRupList()
Method Detail

getRupsAboveMag

public ObsEqkRupList getRupsAboveMag(double mag)
Returns the list of the Observed events above/at the given magnitude.

Parameters:
mag - double Magnitude
Returns:
the subset of total observed events as ObsEqkRupList list above a given magnitude

getRupsBelowMag

public ObsEqkRupList getRupsBelowMag(double mag)
Returns the list of the Observed events below the given magnitude.

Parameters:
mag - double Magnitude
Returns:
the subset of total observed events as ObsEqkRupList list below a given magnitude

getRupsBetweenMag

public ObsEqkRupList getRupsBetweenMag(double mag1,
                                       double mag2)
Returns the list of the Observed events between 2 given magnitudes. It includes lower magnitude in the range but excludes the upper magnitude.

Parameters:
mag1 - double lower magnitude
mag2 - double upper magnitude
Returns:
the subset of total observed events as ObsEqkRupList list between 2 given magnitudes.

getRupsBefore

public ObsEqkRupList getRupsBefore(long timeInMillis)
Returns the list of Observed events before a given time in milliseconds (epoch)

Parameters:
timeInMillis - - what returned by GregorianCalendar.getTimeInMillis()
Returns:
the subset of total observed events as ObsEqkRupList list before a given time period

getRupsAfter

public ObsEqkRupList getRupsAfter(long timeInMillis)
Returns the list of Observed events after a given time in milliseconds (epoch)

Parameters:
timeInMillis - - what returned by GregorianCalendar.getTimeInMillis()
Returns:
the subset of total observed events as ObsEqkRupList list after a given time period

getRupsBetween

public ObsEqkRupList getRupsBetween(long timeInMillis1,
                                    long timeInMillis2)
Returns the list of the Observed events between 2 given time periods.

Parameters:
cal1 - GregorianCalendar Time Period
cal2 - GregorianCalendar Time Period
Returns:
the subset of total observed events as ObsEqkRupList list between 2 given time periods.

getRupsInside

public ObsEqkRupList getRupsInside(Region region)
Returns the list of the Observed events inside a given geographic region

Parameters:
region - Region
Returns:
the subset of total observed events as ObsEqkRupList list inside a given region.

getRupsOutside

public ObsEqkRupList getRupsOutside(Region region)
Returns the list of the Observed events outside a given geographic region

Parameters:
region - Region
Returns:
the subset of total observed events as ObsEqkRupList list outside a given region.

sortByMag

public void sortByMag()
Sorts the Observed Eqk Rupture Event list based on the magitude.


sortByOriginTime

public void sortByOriginTime()
Sorts the Observed Eqk Rupture Event list based on the Origin time.