2627282930313233
int lastFieldIndex = size() - 1; if (lastFieldIndex < 0) { // No previous values to derive from, and thrift enumerations start at zero by default return 0; } IntegerEnumField lastField = get(lastFieldIndex); return lastField.getValue() + 1; }