aboutsummaryrefslogtreecommitdiff
path: root/src/Java/binnie/core/triggers/TriggerData.java
blob: 8784e4278a0fb10b2828a3ddfabb6ebfd69562a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package binnie.core.triggers;

import buildcraft.api.statements.ITriggerExternal;
import java.util.Map.Entry;

public class TriggerData
  implements Map.Entry<ITriggerExternal, Boolean>
{
  private final ITriggerExternal key;
  private Boolean value;
  
  public TriggerData(ITriggerExternal key, Boolean value)
  {
    if (key == null) {
      throw new NullPointerException();
    }
    this.key = key;
    this.value = value;
  }
  
  public ITriggerExternal getKey()
  {
    return this.key;
  }
  
  public Boolean getValue()
  {
    return this.value;
  }
  
  public Boolean setValue(Boolean value)
  {
    Boolean old = this.value;
    this.value = value;
    return old;
  }
}