class NumericByteIterator extends ByteIterator {
  private final byte[] payload;
  private final boolean floatingPoint;
  private int off;
  
  public NumericByteIterator(final long value) {
    floatingPoint = false;
    payload = Utils.longToBytes(value);
    off = 0;
  }
  
  public NumericByteIterator(final double value) {
    floatingPoint = true;
    payload = Utils.doubleToBytes(value);
    off = 0;
  }
  
  @Override
  public boolean hasNext() {
    return off < payload.length;
  }

  @Override
  public byte nextByte() {
    return payload[off++];
  }

  @Override
  public long bytesLeft() {
    return payload.length - off;
  }

  @Override
  public void reset() {
    off = 0;
  }
  
  public long getLong() {
    if (floatingPoint) {
      throw new IllegalStateException("Byte iterator is of the type double");
    }
    return Utils.bytesToLong(payload);
  }

  public double getDouble() {<FILL_FUNCTION_BODY>}

  public boolean isFloatingPoint() {
    return floatingPoint;
  }

}

    if (!floatingPoint) {
      throw new IllegalStateException("Byte iterator is of the type long");
    }
    return Utils.bytesToDouble(payload);
  
<methods>public non-sealed void <init>() ,public abstract long bytesLeft() ,public abstract boolean hasNext() ,public java.lang.Byte next() ,public int nextBuf(byte[], int) ,public abstract byte nextByte() ,public void remove() ,public void reset() ,public byte[] toArray() ,public java.lang.String toString() <variables>