1) Introduced a warning log message for breakpoints that do not match the local path...
[phpeclipse.git] / net.sourceforge.phpeclipse.xdebug.ui / src / net / sourceforge / phpeclipse / xdebug / ui / EnvironmentVariable.java
1 package net.sourceforge.phpeclipse.xdebug.ui;
2
3 /**
4  * A key/value set whose data is passed into Runtime.exec(...)
5  */
6 public class EnvironmentVariable
7 {
8         // The name of the environment variable
9         private String name;
10         
11         // The value of the environment variable
12         private String value;
13         
14         public EnvironmentVariable(String name, String value)
15         {
16                 this.name = name;
17                 this.value = value;
18         }
19
20         /**
21          * Returns this variable's name, which serves as the key in the key/value
22          * pair this variable represents
23          * 
24          * @return this variable's name
25          */
26         public String getName()
27         {
28                 return name;
29         }
30         
31         /**
32          * Returns this variables value.
33          * 
34          * @return this variable's value
35          */
36         public String getValue()
37         {
38                 return value;
39         }
40                 
41         /**
42          * Sets this variable's value
43          * @param value
44          */
45         public void setValue(String value)
46         {
47                 this.value = value;
48         }
49         
50         /* (non-Javadoc)
51          * @see java.lang.Object#toString()
52          */
53         public String toString() {
54                 return getName();
55         }
56         
57         
58         /* (non-Javadoc)
59          * @see java.lang.Object#equals(java.lang.Object)
60          */
61         public boolean equals(Object obj) {
62                 boolean equal = false;
63                 if (obj instanceof EnvironmentVariable) {
64                         EnvironmentVariable var = (EnvironmentVariable)obj;
65                         equal = var.getName().equals(name);
66                 }
67                 return equal;           
68         }
69         /* (non-Javadoc)
70          * @see java.lang.Object#hashCode()
71          */
72         public int hashCode() {
73                 return name.hashCode();
74         }
75 }
76