byte (final int capacity) { if (capacity <= ActualRecords.SmallRecord.MAX_CAPACITY) { return RECORD_SIZE_TYPE_SMALL; } else if (capacity <= ActualRecords.LargeRecord.MAX_CAPACITY) { return RECORD_SIZE_TYPE_LARGE; } throw new IllegalArgumentException("capacity(=" + capacity + ") is too large for a storage"); }