@Override public String toString() { if (isEmpty()) return "[]"; StringBuilder sb = new StringBuilder(); int elementCount = 0; int mc = modCount(); long[] tab = table; long entry; for (int i = tab.length - 1; i >= 0; i--) { if ((int) (entry = tab[i]) < FREE_BITS) { sb.append(' ').append(Float.intBitsToFloat((int) (entry >>> 32))).append(','); if (++elementCount == 8) { int expectedLength = sb.length() * (size() / 8); sb.ensureCapacity(expectedLength + (expectedLength / 2)); } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); sb.setCharAt(0, '['); sb.setCharAt(sb.length() - 1, ']'); return sb.toString(); }
@Override public String toString() { if (isEmpty()) return "[]"; StringBuilder sb = new StringBuilder(); int elementCount = 0; int mc = modCount(); long[] tab = table; long entry; for (int i = tab.length - 1; i >= 0; i--) { if ((int) (entry = tab[i]) < FREE_BITS) { sb.append(' ').append(Float.intBitsToFloat((int) (entry >>> 32))).append(','); if (++elementCount == 8) { int expectedLength = sb.length() * (size() / 8); sb.ensureCapacity(expectedLength + (expectedLength / 2)); } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); sb.setCharAt(0, '['); sb.setCharAt(sb.length() - 1, ']'); return sb.toString(); }
@Override @SuppressWarnings("unchecked") @Nonnull public <T> T[] toArray(@Nonnull T[] a) { int size = size(); if (a.length < size) { Class<?> elementType = a.getClass().getComponentType(); a = (T[]) java.lang.reflect.Array.newInstance(elementType, size); } if (size == 0) { if (a.length > 0) a[0] = null; return a; } int resultIndex = 0; int mc = modCount(); long[] tab = table; long entry; for (int i = tab.length - 1; i >= 0; i--) { if ((int) (entry = tab[i]) < FREE_BITS) { a[resultIndex++] = (T) Float.valueOf(Float.intBitsToFloat((int) (entry >>> 32))); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); if (a.length > resultIndex) a[resultIndex] = null; return a; }
@Override @SuppressWarnings("unchecked") @Nonnull public <T> T[] toArray(@Nonnull T[] a) { int size = size(); if (a.length < size) { Class<?> elementType = a.getClass().getComponentType(); a = (T[]) java.lang.reflect.Array.newInstance(elementType, size); } if (size == 0) { if (a.length > 0) a[0] = null; return a; } int resultIndex = 0; int mc = modCount(); long[] tab = table; long entry; for (int i = tab.length - 1; i >= 0; i--) { if ((int) (entry = tab[i]) < FREE_BITS) { a[resultIndex++] = (T) Float.valueOf(Float.intBitsToFloat((int) (entry >>> 32))); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); if (a.length > resultIndex) a[resultIndex] = null; return a; }
@Override public float[] toArray(float[] a) { int size = size(); if (a.length < size) a = new float[size]; if (size == 0) { if (a.length > 0) a[0] = 0.0f; return a; } int resultIndex = 0; int mc = modCount(); long[] tab = table; long entry; for (int i = tab.length - 1; i >= 0; i--) { if ((int) (entry = tab[i]) < FREE_BITS) { a[resultIndex++] = Float.intBitsToFloat((int) (entry >>> 32)); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); if (a.length > resultIndex) a[resultIndex] = 0.0f; return a; }
@Override public float[] toArray(float[] a) { int size = size(); if (a.length < size) a = new float[size]; if (size == 0) { if (a.length > 0) a[0] = 0.0f; return a; } int resultIndex = 0; int mc = modCount(); long[] tab = table; long entry; for (int i = tab.length - 1; i >= 0; i--) { if ((int) (entry = tab[i]) < FREE_BITS) { a[resultIndex++] = Float.intBitsToFloat((int) (entry >>> 32)); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); if (a.length > resultIndex) a[resultIndex] = 0.0f; return a; }
@Override @Nonnull public Object[] toArray() { int size = size(); Object[] result = new Object[size]; if (size == 0) return result; int resultIndex = 0; int mc = modCount(); long[] tab = table; long entry; for (int i = tab.length - 1; i >= 0; i--) { if ((int) (entry = tab[i]) < FREE_BITS) { result[resultIndex++] = Float.intBitsToFloat((int) (entry >>> 32)); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return result; }
@Override public float[] toFloatArray() { int size = size(); float[] result = new float[size]; if (size == 0) return result; int resultIndex = 0; int mc = modCount(); long[] tab = table; long entry; for (int i = tab.length - 1; i >= 0; i--) { if ((int) (entry = tab[i]) < FREE_BITS) { result[resultIndex++] = Float.intBitsToFloat((int) (entry >>> 32)); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return result; }
@Override public float[] toFloatArray() { int size = size(); float[] result = new float[size]; if (size == 0) return result; int resultIndex = 0; int mc = modCount(); long[] tab = table; long entry; for (int i = tab.length - 1; i >= 0; i--) { if ((int) (entry = tab[i]) < FREE_BITS) { result[resultIndex++] = Float.intBitsToFloat((int) (entry >>> 32)); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return result; }
@Override @Nonnull public Object[] toArray() { int size = size(); Object[] result = new Object[size]; if (size == 0) return result; int resultIndex = 0; int mc = modCount(); long[] tab = table; long entry; for (int i = tab.length - 1; i >= 0; i--) { if ((int) (entry = tab[i]) < FREE_BITS) { result[resultIndex++] = Float.intBitsToFloat((int) (entry >>> 32)); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return result; }