List of usage examples for com.badlogic.gdx.utils IntArray indexOf
public int indexOf(int value)
From source file:com.kotcrab.vis.editor.proxy.EntityProxy.java
License:Apache License
public void addGroup(int groupId, int parentGroupId) { IntArray groupIds = getGroupComponent().groupIds; if (groupIds.contains(groupId) == false) { if (parentGroupId != -1) groupIds.insert(groupIds.indexOf(parentGroupId), groupId); else/* w ww. ja v a 2s.c o m*/ groupIds.add(groupId); } }
From source file:com.kotcrab.vis.editor.proxy.EntityProxy.java
License:Apache License
public int getGroupIdBefore(int gid) { IntArray groupIds = getGroupComponent().groupIds; int index = groupIds.indexOf(gid) - 1; if (gid == -1) return groupIds.peek(); if (index < 0) return -1; else//from w w w. j a v a 2s.com return groupIds.get(index); }
From source file:com.kotcrab.vis.editor.proxy.EntityProxy.java
License:Apache License
public int getGroupIdAfter(int gid) { IntArray groupIds = getGroupComponent().groupIds; int index = groupIds.indexOf(gid) + 1; if (gid == -1) return groupIds.peek(); if (index >= groupIds.size) return -1; else/*w w w . ja va 2 s. com*/ return groupIds.get(index); }