List of usage examples for com.badlogic.gdx.utils IntArray peek
public int peek()
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 . ja v a2s . c o m 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 v a 2 s. c o m return groupIds.get(index); }