static public <T> ObjectSet<T> with (T... array) { ObjectSet set = new ObjectSet(); set.addAll(array); return set; }
static public <T> ObjectSet<T> with (T... array) { ObjectSet set = new ObjectSet(); set.addAll(array); return set; }
/** Creates a {@code PriorityQueue} with the specified initial capacity that orders its elements according to their * {@linkplain Comparable natural ordering}. * * @param initialCapacity the initial capacity for this priority queue */ public PriorityQueue (int initialCapacity) { this.queue = new Object[initialCapacity]; this.set = new ObjectSet<E>(initialCapacity); }
/** Creates a {@code PriorityQueue} with the specified initial capacity that orders its elements according to their * {@linkplain Comparable natural ordering}. * * @param initialCapacity the initial capacity for this priority queue */ public PriorityQueue (int initialCapacity) { this.queue = new Object[initialCapacity]; this.set = new ObjectSet<E>(initialCapacity); }
/** Creates a {@code PriorityQueue} with the specified initial capacity that orders its elements according to their * {@linkplain Comparable natural ordering}. * * @param initialCapacity the initial capacity for this priority queue */ public PriorityQueue(int initialCapacity) { this.queue = new Object[initialCapacity]; this.set = new ObjectSet<E>(initialCapacity); }
private ObjectSet<Button> toolButtons = new ObjectSet(); //put all buttons into this //add this same listener to all buttons. ChangeListener commonListener = new ChangeListener(){ public void changed (ChangeEvent event, Actor actor){ for (Button button : toolButtons){ button.setChecked(button == actor); } setSelectedTool((Button)actor); } }; void setSelectedTool(Button button){ //however you are tracking the selected tool, you can apply the change //here based on which button was pressed } //Also need to set programmatic change events false on all buttons to prevent stack overflow for (Button button : toolButtons) button.setProgrammaticChangeEvents(false);
static public <T> ObjectSet<T> with (T... array) { ObjectSet set = new ObjectSet(); set.addAll(array); return set; }
public InputContext() { keyStates = new ArrayMap<String, Integer>(); keyActions = new ArrayMap<Integer, String>(); listeners = new ObjectSet<InputActionListener>(); }
public synchronized void removeFromStringToNode(SceneGraphNode node) { Keys<String> keys = stringToNode.keys(); ObjectSet<String> hits = new ObjectSet<String>(); for (String key : keys) { if (stringToNode.get(key) == node) hits.add(key); } for (String key : hits) stringToNode.remove(key); }