MCPcopy Create free account
hub / github.com/agateau/pixelwheels / add

Method add

core/src/com/agateau/utils/CircularArray.java:57–68  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

55 }
56
57 public T add() {
58 T element = mItems[mEnd];
59 if (element == null) {
60 element = createInstance();
61 mItems[mEnd] = element;
62 }
63 mEnd = getNextIndex(mEnd);
64 if (mBegin == mEnd) {
65 mBegin = getNextIndex(mBegin);
66 }
67 return element;
68 }
69
70 protected abstract T createInstance();
71}

Callers 15

openURIMethod · 0.45
addListenerMethod · 0.45
addPrinterMethod · 0.45
printMethod · 0.45
loadLanguageMethod · 0.45
initChampionshipsMethod · 0.45
dumpPreferencesMethod · 0.45
addListenerMethod · 0.45
onPlayerSelectedMethod · 0.45
onPlayerSelectedMethod · 0.45
createEntrantsMethod · 0.45

Calls 2

createInstanceMethod · 0.95
getNextIndexMethod · 0.95

Tested by 9

testAddItemMethod · 0.36
testOverwriteMethod · 0.36
createChampionshipsMethod · 0.36
testFillRectangleMethod · 0.36
testPolyline_verticalMethod · 0.36
vector2SetFromCaptorsMethod · 0.36