KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > JSci > physics > particles > AntiStrange


1 package JSci.physics.particles;
2
3 import JSci.physics.quantum.QuantumParticle;
4
5 /**
6 * A class representing antistranges.
7 * @version 1.5
8 * @author Mark Hale
9 */

10 public final class AntiStrange extends AntiQuark {
11         /**
12         * Constructs an antistrange.
13         */

14         public AntiStrange() {}
15         /**
16         * Returns the rest mass (MeV).
17         * @return 160.0
18         */

19         public double restMass() {return 160.0;}
20         /**
21         * Returns the number of 1/3 units of electric charge.
22         * @return 1
23         */

24         public int charge() {return 1;}
25         /**
26         * Returns the strangeness number.
27         * @return 1
28         */

29         public int strangeQN() {return 1;}
30         /**
31         * Returns the antiparticle of this particle.
32         */

33         public QuantumParticle anti() {
34                 return new Strange();
35         }
36         /**
37         * Returns true if qp is the antiparticle.
38         */

39         public boolean isAnti(QuantumParticle qp) {
40                 return (qp!=null) && (qp instanceof Strange);
41         }
42         /**
43         * Returns a string representing this class.
44         */

45         public String JavaDoc toString() {
46                 return new String JavaDoc("Antistrange");
47         }
48 }
49
50
Popular Tags