public boolean equals (Object obj) { if (!(obj instanceof IntSet)) return false; IntSet other = (IntSet)obj; if (other.size != size) return false; if (other.hasZeroValue != hasZeroValue) return false; for (int i = 0, n = capacity + stashSize; i < n; i++) if (keyTable[i] != EMPTY && !other.contains(keyTable[i])) return false; return true; }
public boolean equals (Object obj) { if (!(obj instanceof IntSet)) return false; IntSet other = (IntSet)obj; if (other.size != size) return false; if (other.hasZeroValue != hasZeroValue) return false; for (int i = 0, n = capacity + stashSize; i < n; i++) if (keyTable[i] != EMPTY && !other.contains(keyTable[i])) return false; return true; }
@Override public boolean isButtonPressed (int button) { return pressedButtons.contains(button); }
@Override public boolean isButtonPressed (int button) { return pressedButtons.contains(button) && touched[0]; }
@Override public boolean isButtonPressed (int button) { return pressedButtons.contains(button) && touched[0]; }
@Override public boolean isButtonPressed (int button) { return pressedButtons.contains(button); }
private void handleEvent (NativeEvent e) { if (e.getType().equals("mousedown")) { if (!e.getEventTarget().equals(canvas) || pressedButtons.contains(getButton(e.getButton()))) { float mouseX = getRelativeX(e, canvas); float mouseY = getRelativeY(e, canvas); if (!pressedButtons.contains(getButton(e.getButton()))) return; this.pressedButtons.remove(getButton(e.getButton())); this.touched[0] = pressedButtons.size > 0;
private void handleEvent (NativeEvent e) { if (e.getType().equals("mousedown")) { if (!e.getEventTarget().equals(canvas) || pressedButtons.contains(getButton(e.getButton()))) { float mouseX = getRelativeX(e, canvas); float mouseY = getRelativeY(e, canvas); if (!pressedButtons.contains(getButton(e.getButton()))) return; this.pressedButtons.remove(getButton(e.getButton())); this.touched[0] = pressedButtons.size > 0;
public boolean equals (Object obj) { if (!(obj instanceof IntSet)) return false; IntSet other = (IntSet)obj; if (other.size != size) return false; if (other.hasZeroValue != hasZeroValue) return false; for (int i = 0, n = capacity + stashSize; i < n; i++) if (keyTable[i] != EMPTY && !other.contains(keyTable[i])) return false; return true; }
@Override public boolean isButtonPressed (int button) { return pressedButtons.contains(button); }
@Override public boolean isButtonPressed (int button) { return pressedButtons.contains(button) && touched[0]; }
private void handleEvent (NativeEvent e) { if (e.getType().equals("mousedown")) { if (!e.getEventTarget().equals(canvas) || pressedButtons.contains(getButton(e.getButton()))) { float mouseX = getRelativeX(e, canvas); float mouseY = getRelativeY(e, canvas); if (!pressedButtons.contains(getButton(e.getButton()))) return; this.pressedButtons.remove(getButton(e.getButton())); this.touched[0] = pressedButtons.size > 0;