1 /*
2 The TauP Toolkit: Flexible Seismic Travel-Time and Raypath Utilities.
3 Copyright (C) 1998-2000 University of South Carolina
4
5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public License
7 as published by the Free Software Foundation; either version 2
8 of the License, or (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18
19 The current version can be found at
20 <A HREF="www.seis.sc.edu">http://www.seis.sc.edu</A>
21
22 Bug reports and comments should be directed to
23 H. Philip Crotwell, crotwell@seis.sc.edu or
24 Tom Owens, owens@seis.sc.edu
25
26 */
27
28
29 package edu.sc.seis.TauP;
30
31 import java.io.Serializable;
32
33 /*** Convenience class that allows a sac header variable to be associated
34 * with a seismic phase name.
35 *
36 * @version 1.1.3 Wed Jul 18 15:00:35 GMT 2001
37
38
39
40 * @author H. Philip Crotwell
41 *
42 */
43 public class PhaseName implements Serializable, Cloneable {
44
45 /*** name of the phase, ie PKIKP */
46 public String name;
47
48 /*** sac t header to be associated with the phase */
49 public int sacTNum = -1;
50
51 public PhaseName(String name) {
52 this.name = name;
53 }
54
55 public PhaseName(String name, int sacTNum) {
56 this.name = name;
57 this.sacTNum = sacTNum;
58 }
59
60 public boolean equals(PhaseName obj) {
61 if (obj.name.equals(this.name) &&
62 obj.sacTNum == this.sacTNum) {
63 return true;
64 } else {
65 return false;
66 }
67 }
68
69 public String getName() {
70 return name;
71 }
72
73 public String toString() {
74 return name;
75 }
76 }