MCPcopy Index your code
hub / github.com/BombusMod/BombusMod / searchGroup

Method searchGroup

src/main/java/Client/Roster.java:2010–2034  ·  view source on GitHub ↗
(int direction)

Source from the content-addressed store, hash-verified

2008//#endif
2009
2010 private int searchGroup(int direction) {
2011 int newpos = -1;
2012 synchronized (itemsList) {
2013 int size = itemsList.size();
2014 int pos = cursor;
2015 int count = size;
2016 try {
2017 while (count > 0) {
2018 pos += direction;
2019 if (pos < 0) {
2020 pos = size - 1;
2021 }
2022 if (pos >= size) {
2023 pos = 0;
2024 }
2025 if (itemsList.elementAt(pos) instanceof Group) {
2026 break;
2027 }
2028 }
2029 } catch (Exception e) {
2030 }
2031 newpos = pos;
2032 }
2033 return newpos;
2034 }
2035
2036 public void searchActiveContact(int direction) {
2037 Vector activeContacts = new Vector();

Callers 1

moveFocusToGroupMethod · 0.95

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected