bugged
stringlengths
6
599k
fixed
stringlengths
6
40.8M
__index_level_0__
int64
0
3.24M
public Dimension preferredSize() { if (prefSize == null) if (peer == null) return new Dimension(width, height); else prefSize = peer.getPreferredSize(); return prefSize; }
public Dimension preferredSize() { if (prefSize == null) if (peer == null) prefSize = minimumSize(); else prefSize = peer.getPreferredSize(); return prefSize; }
14,998
public AssertionError(Object msg) { super("" + msg); if (msg instanceof Throwable) initCause((Throwable) msg); }
public AssertionError() { super("" + msg); if (msg instanceof Throwable) initCause((Throwable) msg); }
15,000
public AssertionError(Object msg) { super("" + msg); if (msg instanceof Throwable) initCause((Throwable) msg); }
public AssertionError(Object msg) { super("" + msg); if (msg instanceof Throwable) initCause((Throwable) msg); }
15,001
public Graphics create(int x, int y, int width, int height) { Graphics g = create(); g.translate(x, y); // FIXME: I'm not sure if this will work. Are the old clip rect bounds // translated above? g.clipRect(0, 0, width, height); return(g); }
public Graphics create(int x, int y, int width, int height) { Graphics g = create(); g.translate(x, y); // FIXME: I'm not sure if this will work. Are the old clip rect bounds // translated above? g.clipRect(0, 0, width, height); return(g); }
15,003
public MetalLookAndFeel() { }
public MetalLookAndFeel() { }
15,005
public UIDefaults getDefaults() { if (LAF_defaults == null) LAF_defaults = new BasicDefaults(); // Returns the default values for this look and feel. return LAF_defaults; }
public UIDefaults getDefaults() { if (LAF_defaults == null) LAF_defaults = new BasicDefaults(); // Returns the default values for this look and feel. return LAF_defaults; }
15,006
public String getDescription() { return "Metal look and feel"; }
public String getDescription() { return "Metal look and feel"; }
15,007
public String getID() { return "MetalLookAndFeel"; }
public String getID() { return "MetalLookAndFeel"; }
15,008
public String getName() { return "MetalLookAndFeel"; }
public String getName() { return "MetalLookAndFeel"; }
15,009
public boolean isNativeLookAndFeel() { return true; }
public boolean isNativeLookAndFeel() { return true; }
15,010
public boolean isSupportedLookAndFeel() { return true; }
public boolean isSupportedLookAndFeel() { return true; }
15,011
public JIFSFile(String name) { this.name = name; }
public JIFSFile(String name) { this.name = name; }
15,012
public synchronized binaryReply submit() { gnu.CORBA.GIOP.MessageHeader header = new gnu.CORBA.GIOP.MessageHeader(); header.setBigEndian(Big_endian); // The byte order will be Big Endian by default. header.message_type = gnu.CORBA.GIOP.MessageHeader.REQUEST; header.version = useVersion(ior.Internet.version); RequestHeader rh = header.create_request_header(); rh.object_key = ior.key; rh.operation = m_operation; // Prepare the submission. cdrBufOutput request_part = new cdrBufOutput(); request_part.setOffset(header.getHeaderSize()); request_part.setVersion(header.version); request_part.setCodeSet(cxCodeSet.negotiate(ior.CodeSets)); request_part.setOrb(orb); request_part.setBigEndian(header.isBigEndian()); // This also sets the stream encoding to the encoding, specified // in the header. rh.write(request_part); if (m_args != null && m_args.count() > 0) { write_parameters(header, request_part); if (m_parameter_buffer != null) throw new BAD_INV_ORDER("Please either add parameters or " + "write them into stream, but not both " + "at once." ); } if (m_parameter_buffer != null) { write_parameter_buffer(header, request_part); } // Now the message size is available. header.message_size = request_part.buffer.size(); Socket socket = null; java.lang.Object key = ior.Internet.host+":"+ior.Internet.port; synchronized (SocketRepository.class) { socket = SocketRepository.get_socket(key); } try { long pause = PAUSE_INITIAL; if (socket == null) { // The BindException may be thrown under very heavy parallel // load. For some time, just wait, exceptiong the socket to free. Open: for (int i = 0; i < PAUSE_STEPS; i++) { try { socket = new Socket(ior.Internet.host, ior.Internet.port); break Open; } catch (BindException ex) { try { // Expecting to free a socket via finaliser. System.gc(); Thread.sleep(pause); pause = pause * 2; if (pause > PAUSE_MAX) pause = PAUSE_MAX; } catch (InterruptedException iex) { } } } } if (socket == null) throw new NO_RESOURCES(ior.Internet.host + ":" + ior.Internet.port + " in use" ); socket.setKeepAlive(true); OutputStream socketOutput = socket.getOutputStream(); // Write the message header. header.write(socketOutput); // Write the request header and parameters (if present). request_part.buffer.writeTo(socketOutput); socketOutput.flush(); if (!socket.isClosed()) { MessageHeader response_header = new MessageHeader(); InputStream socketInput = socket.getInputStream(); response_header.read(socketInput); byte[] r = new byte[ response_header.message_size ]; int n = 0; reading: while (n < r.length) { n += socketInput.read(r, n, r.length - n); } return new binaryReply(orb, response_header, r); } else return EMPTY; } catch (IOException io_ex) { return null; } finally { try { if (socket != null && !socket.isClosed()) { socket.setSoTimeout(Functional_ORB.TANDEM_REQUESTS); SocketRepository.put_socket(key, socket ); } } catch (IOException scx) { InternalError ierr = new InternalError(); ierr.initCause(scx); throw ierr; } } }
public synchronized binaryReply submit() { gnu.CORBA.GIOP.MessageHeader header = new gnu.CORBA.GIOP.MessageHeader(); header.setBigEndian(Big_endian); // The byte order will be Big Endian by default. header.message_type = gnu.CORBA.GIOP.MessageHeader.REQUEST; header.version = useVersion(ior.Internet.version); RequestHeader rh = header.create_request_header(); rh.object_key = ior.key; rh.operation = m_operation; // Prepare the submission. cdrBufOutput request_part = new cdrBufOutput(); request_part.setOffset(header.getHeaderSize()); request_part.setVersion(header.version); request_part.setCodeSet(cxCodeSet.negotiate(ior.CodeSets)); request_part.setOrb(orb); request_part.setBigEndian(header.isBigEndian()); // This also sets the stream encoding to the encoding, specified // in the header. rh.write(request_part); if (m_args != null && m_args.count() > 0) { write_parameters(header, request_part); if (m_parameter_buffer != null) throw new BAD_INV_ORDER("Please either add parameters or " + "write them into stream, but not both " + "at once." ); } if (m_parameter_buffer != null) { write_parameter_buffer(header, request_part); } // Now the message size is available. header.message_size = request_part.buffer.size(); Socket socket = null; java.lang.Object key = ior.Internet.host + ":" + ior.Internet.port; synchronized (SocketRepository.class) { socket = SocketRepository.get_socket(key); } try { long pause = PAUSE_INITIAL; if (socket == null) { // The BindException may be thrown under very heavy parallel // load. For some time, just wait, exceptiong the socket to free. Open: for (int i = 0; i < PAUSE_STEPS; i++) { try { socket = new Socket(ior.Internet.host, ior.Internet.port); break Open; } catch (BindException ex) { try { // Expecting to free a socket via finaliser. System.gc(); Thread.sleep(pause); pause = pause * 2; if (pause > PAUSE_MAX) pause = PAUSE_MAX; } catch (InterruptedException iex) { } } } } if (socket == null) throw new NO_RESOURCES(ior.Internet.host + ":" + ior.Internet.port + " in use" ); socket.setKeepAlive(true); OutputStream socketOutput = socket.getOutputStream(); // Write the message header. header.write(socketOutput); // Write the request header and parameters (if present). request_part.buffer.writeTo(socketOutput); socketOutput.flush(); if (!socket.isClosed()) { MessageHeader response_header = new MessageHeader(); InputStream socketInput = socket.getInputStream(); response_header.read(socketInput); byte[] r = new byte[ response_header.message_size ]; int n = 0; reading: while (n < r.length) { n += socketInput.read(r, n, r.length - n); } return new binaryReply(orb, response_header, r); } else return EMPTY; } catch (IOException io_ex) { return null; } finally { try { if (socket != null && !socket.isClosed()) { socket.setSoTimeout(Functional_ORB.TANDEM_REQUESTS); SocketRepository.put_socket(key, socket ); } } catch (IOException scx) { InternalError ierr = new InternalError(); ierr.initCause(scx); throw ierr; } } }
15,013
public synchronized binaryReply submit() { gnu.CORBA.GIOP.MessageHeader header = new gnu.CORBA.GIOP.MessageHeader(); header.setBigEndian(Big_endian); // The byte order will be Big Endian by default. header.message_type = gnu.CORBA.GIOP.MessageHeader.REQUEST; header.version = useVersion(ior.Internet.version); RequestHeader rh = header.create_request_header(); rh.object_key = ior.key; rh.operation = m_operation; // Prepare the submission. cdrBufOutput request_part = new cdrBufOutput(); request_part.setOffset(header.getHeaderSize()); request_part.setVersion(header.version); request_part.setCodeSet(cxCodeSet.negotiate(ior.CodeSets)); request_part.setOrb(orb); request_part.setBigEndian(header.isBigEndian()); // This also sets the stream encoding to the encoding, specified // in the header. rh.write(request_part); if (m_args != null && m_args.count() > 0) { write_parameters(header, request_part); if (m_parameter_buffer != null) throw new BAD_INV_ORDER("Please either add parameters or " + "write them into stream, but not both " + "at once." ); } if (m_parameter_buffer != null) { write_parameter_buffer(header, request_part); } // Now the message size is available. header.message_size = request_part.buffer.size(); Socket socket = null; java.lang.Object key = ior.Internet.host+":"+ior.Internet.port; synchronized (SocketRepository.class) { socket = SocketRepository.get_socket(key); } try { long pause = PAUSE_INITIAL; if (socket == null) { // The BindException may be thrown under very heavy parallel // load. For some time, just wait, exceptiong the socket to free. Open: for (int i = 0; i < PAUSE_STEPS; i++) { try { socket = new Socket(ior.Internet.host, ior.Internet.port); break Open; } catch (BindException ex) { try { // Expecting to free a socket via finaliser. System.gc(); Thread.sleep(pause); pause = pause * 2; if (pause > PAUSE_MAX) pause = PAUSE_MAX; } catch (InterruptedException iex) { } } } } if (socket == null) throw new NO_RESOURCES(ior.Internet.host + ":" + ior.Internet.port + " in use" ); socket.setKeepAlive(true); OutputStream socketOutput = socket.getOutputStream(); // Write the message header. header.write(socketOutput); // Write the request header and parameters (if present). request_part.buffer.writeTo(socketOutput); socketOutput.flush(); if (!socket.isClosed()) { MessageHeader response_header = new MessageHeader(); InputStream socketInput = socket.getInputStream(); response_header.read(socketInput); byte[] r = new byte[ response_header.message_size ]; int n = 0; reading: while (n < r.length) { n += socketInput.read(r, n, r.length - n); } return new binaryReply(orb, response_header, r); } else return EMPTY; } catch (IOException io_ex) { return null; } finally { try { if (socket != null && !socket.isClosed()) { socket.setSoTimeout(Functional_ORB.TANDEM_REQUESTS); SocketRepository.put_socket(key, socket ); } } catch (IOException scx) { InternalError ierr = new InternalError(); ierr.initCause(scx); throw ierr; } } }
public synchronized binaryReply submit() { gnu.CORBA.GIOP.MessageHeader header = new gnu.CORBA.GIOP.MessageHeader(); header.setBigEndian(Big_endian); // The byte order will be Big Endian by default. header.message_type = gnu.CORBA.GIOP.MessageHeader.REQUEST; header.version = useVersion(ior.Internet.version); RequestHeader rh = header.create_request_header(); rh.object_key = ior.key; rh.operation = m_operation; // Prepare the submission. cdrBufOutput request_part = new cdrBufOutput(); request_part.setOffset(header.getHeaderSize()); request_part.setVersion(header.version); request_part.setCodeSet(cxCodeSet.negotiate(ior.CodeSets)); request_part.setOrb(orb); request_part.setBigEndian(header.isBigEndian()); // This also sets the stream encoding to the encoding, specified // in the header. rh.write(request_part); if (m_args != null && m_args.count() > 0) { write_parameters(header, request_part); if (m_parameter_buffer != null) throw new BAD_INV_ORDER("Please either add parameters or " + "write them into stream, but not both " + "at once." ); } if (m_parameter_buffer != null) { write_parameter_buffer(header, request_part); } // Now the message size is available. header.message_size = request_part.buffer.size(); Socket socket = null; java.lang.Object key = ior.Internet.host+":"+ior.Internet.port; synchronized (SocketRepository.class) { socket = SocketRepository.get_socket(key); } try { long pause = PAUSE_INITIAL; if (socket == null) { // The BindException may be thrown under very heavy parallel // load. For some time, just wait, exceptiong the socket to free. Open: for (int i = 0; i < PAUSE_STEPS; i++) { try { socket = new Socket(ior.Internet.host, ior.Internet.port); break Open; } catch (BindException ex) { try { // Expecting to free a socket via finaliser. System.gc(); Thread.sleep(pause); pause = pause * 2; if (pause > PAUSE_MAX) pause = PAUSE_MAX; } catch (InterruptedException iex) { } } } } if (socket == null) throw new NO_RESOURCES(ior.Internet.host + ":" + ior.Internet.port + " in use" ); socket.setKeepAlive(true); OutputStream socketOutput = socket.getOutputStream(); // Write the message header. header.write(socketOutput); // Write the request header and parameters (if present). request_part.buffer.writeTo(socketOutput); socketOutput.flush(); if (!socket.isClosed()) { MessageHeader response_header = new MessageHeader(); InputStream socketInput = socket.getInputStream(); response_header.read(socketInput); byte[] r = new byte[ response_header.message_size ]; int n = 0; reading: while (n < r.length) { n += socketInput.read(r, n, r.length - n); } return new binaryReply(orb, response_header, r); } else return EMPTY; } catch (IOException io_ex) { MARSHAL m = new MARSHAL("Unable to open a socket at " + ior.Internet.host + ":" + ior.Internet.port ); m.initCause(io_ex); throw m; } finally { try { if (socket != null && !socket.isClosed()) { socket.setSoTimeout(Functional_ORB.TANDEM_REQUESTS); SocketRepository.put_socket(key, socket ); } } catch (IOException scx) { InternalError ierr = new InternalError(); ierr.initCause(scx); throw ierr; } } }
15,014
public synchronized binaryReply submit() { gnu.CORBA.GIOP.MessageHeader header = new gnu.CORBA.GIOP.MessageHeader(); header.setBigEndian(Big_endian); // The byte order will be Big Endian by default. header.message_type = gnu.CORBA.GIOP.MessageHeader.REQUEST; header.version = useVersion(ior.Internet.version); RequestHeader rh = header.create_request_header(); rh.object_key = ior.key; rh.operation = m_operation; // Prepare the submission. cdrBufOutput request_part = new cdrBufOutput(); request_part.setOffset(header.getHeaderSize()); request_part.setVersion(header.version); request_part.setCodeSet(cxCodeSet.negotiate(ior.CodeSets)); request_part.setOrb(orb); request_part.setBigEndian(header.isBigEndian()); // This also sets the stream encoding to the encoding, specified // in the header. rh.write(request_part); if (m_args != null && m_args.count() > 0) { write_parameters(header, request_part); if (m_parameter_buffer != null) throw new BAD_INV_ORDER("Please either add parameters or " + "write them into stream, but not both " + "at once." ); } if (m_parameter_buffer != null) { write_parameter_buffer(header, request_part); } // Now the message size is available. header.message_size = request_part.buffer.size(); Socket socket = null; java.lang.Object key = ior.Internet.host+":"+ior.Internet.port; synchronized (SocketRepository.class) { socket = SocketRepository.get_socket(key); } try { long pause = PAUSE_INITIAL; if (socket == null) { // The BindException may be thrown under very heavy parallel // load. For some time, just wait, exceptiong the socket to free. Open: for (int i = 0; i < PAUSE_STEPS; i++) { try { socket = new Socket(ior.Internet.host, ior.Internet.port); break Open; } catch (BindException ex) { try { // Expecting to free a socket via finaliser. System.gc(); Thread.sleep(pause); pause = pause * 2; if (pause > PAUSE_MAX) pause = PAUSE_MAX; } catch (InterruptedException iex) { } } } } if (socket == null) throw new NO_RESOURCES(ior.Internet.host + ":" + ior.Internet.port + " in use" ); socket.setKeepAlive(true); OutputStream socketOutput = socket.getOutputStream(); // Write the message header. header.write(socketOutput); // Write the request header and parameters (if present). request_part.buffer.writeTo(socketOutput); socketOutput.flush(); if (!socket.isClosed()) { MessageHeader response_header = new MessageHeader(); InputStream socketInput = socket.getInputStream(); response_header.read(socketInput); byte[] r = new byte[ response_header.message_size ]; int n = 0; reading: while (n < r.length) { n += socketInput.read(r, n, r.length - n); } return new binaryReply(orb, response_header, r); } else return EMPTY; } catch (IOException io_ex) { return null; } finally { try { if (socket != null && !socket.isClosed()) { socket.setSoTimeout(Functional_ORB.TANDEM_REQUESTS); SocketRepository.put_socket(key, socket ); } } catch (IOException scx) { InternalError ierr = new InternalError(); ierr.initCause(scx); throw ierr; } } }
public synchronized binaryReply submit() { gnu.CORBA.GIOP.MessageHeader header = new gnu.CORBA.GIOP.MessageHeader(); header.setBigEndian(Big_endian); // The byte order will be Big Endian by default. header.message_type = gnu.CORBA.GIOP.MessageHeader.REQUEST; header.version = useVersion(ior.Internet.version); RequestHeader rh = header.create_request_header(); rh.object_key = ior.key; rh.operation = m_operation; // Prepare the submission. cdrBufOutput request_part = new cdrBufOutput(); request_part.setOffset(header.getHeaderSize()); request_part.setVersion(header.version); request_part.setCodeSet(cxCodeSet.negotiate(ior.CodeSets)); request_part.setOrb(orb); request_part.setBigEndian(header.isBigEndian()); // This also sets the stream encoding to the encoding, specified // in the header. rh.write(request_part); if (m_args != null && m_args.count() > 0) { write_parameters(header, request_part); if (m_parameter_buffer != null) throw new BAD_INV_ORDER("Please either add parameters or " + "write them into stream, but not both " + "at once." ); } if (m_parameter_buffer != null) { write_parameter_buffer(header, request_part); } // Now the message size is available. header.message_size = request_part.buffer.size(); Socket socket = null; java.lang.Object key = ior.Internet.host+":"+ior.Internet.port; synchronized (SocketRepository.class) { socket = SocketRepository.get_socket(key); } try { long pause = PAUSE_INITIAL; if (socket == null) { // The BindException may be thrown under very heavy parallel // load. For some time, just wait, exceptiong the socket to free. Open: for (int i = 0; i < PAUSE_STEPS; i++) { try { socket = new Socket(ior.Internet.host, ior.Internet.port); break Open; } catch (BindException ex) { try { // Expecting to free a socket via finaliser. System.gc(); Thread.sleep(pause); pause = pause * 2; if (pause > PAUSE_MAX) pause = PAUSE_MAX; } catch (InterruptedException iex) { } } } } if (socket == null) throw new NO_RESOURCES(ior.Internet.host + ":" + ior.Internet.port + " in use" ); socket.setKeepAlive(true); OutputStream socketOutput = socket.getOutputStream(); // Write the message header. header.write(socketOutput); // Write the request header and parameters (if present). request_part.buffer.writeTo(socketOutput); socketOutput.flush(); if (!socket.isClosed()) { MessageHeader response_header = new MessageHeader(); InputStream socketInput = socket.getInputStream(); response_header.read(socketInput); byte[] r = new byte[ response_header.message_size ]; int n = 0; reading: while (n < r.length) { n += socketInput.read(r, n, r.length - n); } return new binaryReply(orb, response_header, r); } else return EMPTY; } catch (IOException io_ex) { return null; } finally { try { if (socket != null && !socket.isClosed()) { socket.setSoTimeout(Functional_ORB.TANDEM_REQUESTS); SocketRepository.put_socket(key, socket ); } } catch (IOException scx) { InternalError ierr = new InternalError(); ierr.initCause(scx); throw ierr; } } }
15,015
public Unexpected(Exception why) { super(SHARED_MESSAGE); if (why != null) initCause(why); }
public Unexpected(String msg, Exception why) { super(SHARED_MESSAGE); if (why != null) initCause(why); }
15,016
public Unexpected(Exception why) { super(SHARED_MESSAGE); if (why != null) initCause(why); }
public Unexpected(Exception why) { super(msg + ". " + SHARED_MESSAGE); if (why != null) initCause(why); }
15,017
public void add(NamedValue value) { list.add(value); }
public NamedValue add(int a_flags) { list.add(value); }
15,018
public void add(NamedValue value) { list.add(value); }
public void add(NamedValue value) { return add_value(null, new gnuAny(), a_flags); }
15,019
public static void error(Exception why) { throw new Unexpected(why); }
public static void error(String msg, Exception why) { throw new Unexpected(why); }
15,020
public static void error(Exception why) { throw new Unexpected(why); }
public static void error(Exception why) { throw new Unexpected(msg, why); }
15,021
public abstract void exception(Exception except);
public abstract void exception(Exception except);
15,022
public UnknownUserException(Any an_exception) { except = an_exception; }
public UnknownUserException() { except = an_exception; }
15,023
public UnknownUserException(Any an_exception) { except = an_exception; }
public UnknownUserException(Any an_exception) { }
15,024
public Socket(String host, int port) throws UnknownHostException, IOException { this(InetAddress.getByName(host), port, null, 0, true); }
public Socket(String host, int port) throws UnknownHostException, IOException { this(InetAddress.getByName(host), port, null, 0, true); }
15,025
public Socket(String host, int port) throws UnknownHostException, IOException { this(InetAddress.getByName(host), port, null, 0, true); }
public Socket(String host, int port) throws UnknownHostException, IOException { this(InetAddress.getByName(host), port, null, 0, true); }
15,026
public void read(java.io.InputStream istream) throws MARSHAL { try { DataInputStream din = new DataInputStream(istream); byte[] xMagic = new byte[ MAGIC.length ]; din.read(xMagic); if (!Arrays.equals(xMagic, MAGIC)) throw new MARSHAL("Not a GIOP message"); version = Version.read_version(din); flags = (byte) din.read(); /** TODO implement support for the little endian. */ if (!isBigEndian()) throw new MARSHAL("Little endian unsupported."); message_type = (byte) din.read(); message_size = din.readInt(); } catch (IOException ex) { throw new MARSHAL(ex.toString()); } }
public void read(java.io.InputStream istream) throws MARSHAL { try { byte[] xMagic = new byte[ MAGIC.length ]; din.read(xMagic); if (!Arrays.equals(xMagic, MAGIC)) throw new MARSHAL("Not a GIOP message"); version = Version.read_version(din); flags = (byte) din.read(); /** TODO implement support for the little endian. */ if (!isBigEndian()) throw new MARSHAL("Little endian unsupported."); message_type = (byte) din.read(); message_size = din.readInt(); } catch (IOException ex) { throw new MARSHAL(ex.toString()); } }
15,027
public void read(java.io.InputStream istream) throws MARSHAL { try { DataInputStream din = new DataInputStream(istream); byte[] xMagic = new byte[ MAGIC.length ]; din.read(xMagic); if (!Arrays.equals(xMagic, MAGIC)) throw new MARSHAL("Not a GIOP message"); version = Version.read_version(din); flags = (byte) din.read(); /** TODO implement support for the little endian. */ if (!isBigEndian()) throw new MARSHAL("Little endian unsupported."); message_type = (byte) din.read(); message_size = din.readInt(); } catch (IOException ex) { throw new MARSHAL(ex.toString()); } }
public void read(java.io.InputStream istream) throws MARSHAL { try { DataInputStream din = new DataInputStream(istream); byte[] xMagic = new byte[ MAGIC.length ]; istream.read(xMagic); if (!Arrays.equals(xMagic, MAGIC)) throw new MARSHAL("Not a GIOP message"); version = Version.read_version(din); flags = (byte) din.read(); /** TODO implement support for the little endian. */ if (!isBigEndian()) throw new MARSHAL("Little endian unsupported."); message_type = (byte) din.read(); message_size = din.readInt(); } catch (IOException ex) { throw new MARSHAL(ex.toString()); } }
15,028
public void read(java.io.InputStream istream) throws MARSHAL { try { DataInputStream din = new DataInputStream(istream); byte[] xMagic = new byte[ MAGIC.length ]; din.read(xMagic); if (!Arrays.equals(xMagic, MAGIC)) throw new MARSHAL("Not a GIOP message"); version = Version.read_version(din); flags = (byte) din.read(); /** TODO implement support for the little endian. */ if (!isBigEndian()) throw new MARSHAL("Little endian unsupported."); message_type = (byte) din.read(); message_size = din.readInt(); } catch (IOException ex) { throw new MARSHAL(ex.toString()); } }
public void read(java.io.InputStream istream) throws MARSHAL { try { DataInputStream din = new DataInputStream(istream); byte[] xMagic = new byte[ MAGIC.length ]; din.read(xMagic); if (!Arrays.equals(xMagic, MAGIC)) throw new MARSHAL("Not a GIOP message"); version = Version.read_version(istream); flags = (byte) din.read(); /** TODO implement support for the little endian. */ if (!isBigEndian()) throw new MARSHAL("Little endian unsupported."); message_type = (byte) din.read(); message_size = din.readInt(); } catch (IOException ex) { throw new MARSHAL(ex.toString()); } }
15,029
public void read(java.io.InputStream istream) throws MARSHAL { try { DataInputStream din = new DataInputStream(istream); byte[] xMagic = new byte[ MAGIC.length ]; din.read(xMagic); if (!Arrays.equals(xMagic, MAGIC)) throw new MARSHAL("Not a GIOP message"); version = Version.read_version(din); flags = (byte) din.read(); /** TODO implement support for the little endian. */ if (!isBigEndian()) throw new MARSHAL("Little endian unsupported."); message_type = (byte) din.read(); message_size = din.readInt(); } catch (IOException ex) { throw new MARSHAL(ex.toString()); } }
public void read(java.io.InputStream istream) throws MARSHAL { try { DataInputStream din = new DataInputStream(istream); byte[] xMagic = new byte[ MAGIC.length ]; din.read(xMagic); if (!Arrays.equals(xMagic, MAGIC)) throw new MARSHAL("Not a GIOP message"); version = Version.read_version(din); abstractDataInputStream din; /** TODO implement support for the little endian. */ if (!isBigEndian()) throw new MARSHAL("Little endian unsupported."); message_type = (byte) din.read(); message_size = din.readInt(); } catch (IOException ex) { throw new MARSHAL(ex.toString()); } }
15,030
public void read(java.io.InputStream istream) throws MARSHAL { try { DataInputStream din = new DataInputStream(istream); byte[] xMagic = new byte[ MAGIC.length ]; din.read(xMagic); if (!Arrays.equals(xMagic, MAGIC)) throw new MARSHAL("Not a GIOP message"); version = Version.read_version(din); flags = (byte) din.read(); /** TODO implement support for the little endian. */ if (!isBigEndian()) throw new MARSHAL("Little endian unsupported."); message_type = (byte) din.read(); message_size = din.readInt(); } catch (IOException ex) { throw new MARSHAL(ex.toString()); } }
public void read(java.io.InputStream istream) throws MARSHAL { try { DataInputStream din = new DataInputStream(istream); byte[] xMagic = new byte[ MAGIC.length ]; din.read(xMagic); if (!Arrays.equals(xMagic, MAGIC)) throw new MARSHAL("Not a GIOP message"); version = Version.read_version(din); flags = (byte) din.read(); /** TODO implement support for the little endian. */ if (!isBigEndian()) throw new MARSHAL("Little endian unsupported."); message_type = (byte) din.read(); message_size = din.readInt(); } catch (IOException ex) { throw new MARSHAL(ex.toString()); } }
15,031
public void read(java.io.InputStream istream) throws MARSHAL { try { DataInputStream din = new DataInputStream(istream); byte[] xMagic = new byte[ MAGIC.length ]; din.read(xMagic); if (!Arrays.equals(xMagic, MAGIC)) throw new MARSHAL("Not a GIOP message"); version = Version.read_version(din); flags = (byte) din.read(); /** TODO implement support for the little endian. */ if (!isBigEndian()) throw new MARSHAL("Little endian unsupported."); message_type = (byte) din.read(); message_size = din.readInt(); } catch (IOException ex) { throw new MARSHAL(ex.toString()); } }
public void read(java.io.InputStream istream) throws MARSHAL { try { DataInputStream din = new DataInputStream(istream); byte[] xMagic = new byte[ MAGIC.length ]; din.read(xMagic); if (!Arrays.equals(xMagic, MAGIC)) throw new MARSHAL("Not a GIOP message"); version = Version.read_version(din); flags = (byte) din.read(); /** TODO implement support for the little endian. */ if (!isBigEndian()) throw new MARSHAL("Little endian unsupported."); message_type = (byte) din.read(); message_size = din.readInt(); } catch (IOException ex) { MARSHAL t = new MARSHAL(); t.initCause(ex); throw t; } }
15,032
public ArrayStoreException(String s) { super(s); }
public ArrayStoreException(String s) { super(s); }
15,034
public final Object clone(Cloneable object) { testInited(); final VmClassType objectClass = VmMagic.getObjectType(object); final Address objectPtr = ObjectReference.fromObject(object).toAddress(); final int size; if (objectClass.isArray()) { final int slotSize = Unsafe.getCurrentProcessor().getArchitecture().getReferenceSize(); final VmArrayClass arrayClass = (VmArrayClass) objectClass; final int length = objectPtr.loadInt(Offset.fromIntSignExtend(VmArray.LENGTH_OFFSET * slotSize)); final int elemSize = arrayClass.getComponentType().getTypeSize(); size = (VmArray.DATA_OFFSET * slotSize) * (length * elemSize); } else { final VmNormalClass normalClass = (VmNormalClass) objectClass; size = normalClass.getObjectSize(); } final Object newObj = allocObject(objectClass, size); helper.copy(objectPtr, ObjectReference.fromObject(newObj).toAddress(), size); return newObj; }
public final Object clone(Cloneable object) { testInited(); final VmClassType objectClass = VmMagic.getObjectType(object); final Address objectPtr = ObjectReference.fromObject(object).toAddress(); final int size; if (objectClass.isArray()) { final int slotSize = Unsafe.getCurrentProcessor().getArchitecture().getReferenceSize(); final VmArrayClass arrayClass = (VmArrayClass) objectClass; final int length = objectPtr.loadInt(Offset.fromIntSignExtend(VmArray.LENGTH_OFFSET * slotSize)); final int elemSize = arrayClass.getComponentType().getTypeSize(); size = (VmArray.DATA_OFFSET * slotSize) * (length * elemSize); } else { final VmNormalClass normalClass = (VmNormalClass) objectClass; size = normalClass.getObjectSize(); } final Object newObj = allocObject(objectClass, size); helper.copy(objectPtr, ObjectReference.fromObject(newObj).toAddress(), size); return newObj; }
15,035
final VmMethod getMethod(Address sf) { return (VmMethod)Unsafe.getObject(sf, getMethodOffset(sf)); }
final VmMethod getMethod(Address sf) { return (VmMethod)Unsafe.getObject(sf, getMethodOffset(sf)); }
15,036
public Exception(String s) { super(s); }
public Exception() { super(s); }
15,037
public Exception(String s) { super(s); }
public Exception(String s) { }
15,038
private FSEntryTable() { entries = Collections.EMPTY_MAP; entryNames = Collections.EMPTY_LIST; }
private FSEntryTable() { entries = Collections.EMPTY_MAP; entryNames = Collections.EMPTY_LIST; }
15,039
public final void setPrefix(String prefix) { if (readonly) { throw new DomEx(DomEx.NO_MODIFICATION_ALLOWED_ERR); } if (prefix == null) { name = localName; return; } else if (namespace == null) { throw new DomEx(DomEx.NAMESPACE_ERR, "can't set prefix, node has no namespace URI", this, 0); } DomDocument.checkName(prefix, "1.1".equals(owner.getXmlVersion())); if (prefix.indexOf (':') != -1) { throw new DomEx(DomEx.NAMESPACE_ERR, "illegal prefix " + prefix, this, 0); } if (XMLConstants.XML_NS_PREFIX.equals(prefix) && !XMLConstants.XML_NS_URI.equals(namespace)) { throw new DomEx(DomEx.NAMESPACE_ERR, "xml namespace is always " + XMLConstants.XML_NS_URI, this, 0); } if (XMLConstants.XMLNS_ATTRIBUTE.equals(prefix)) { if (namespace != null || getNodeType() != ATTRIBUTE_NODE) { throw new DomEx(DomEx.NAMESPACE_ERR, "xmlns attribute prefix is reserved", this, 0); } } else if (getNodeType () == ATTRIBUTE_NODE && (XMLConstants.XMLNS_ATTRIBUTE.equals(name) || name.startsWith("xmlns:"))) { throw new DomEx(DomEx.NAMESPACE_ERR, "namespace declarations can't change names", this, 0); } this.prefix = prefix.intern(); }
public final void setPrefix(String prefix) { if (readonly) { throw new DomDOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR); } if (prefix == null) { name = localName; return; } else if (namespace == null) { throw new DomEx(DomEx.NAMESPACE_ERR, "can't set prefix, node has no namespace URI", this, 0); } DomDocument.checkName(prefix, "1.1".equals(owner.getXmlVersion())); if (prefix.indexOf (':') != -1) { throw new DomEx(DomEx.NAMESPACE_ERR, "illegal prefix " + prefix, this, 0); } if (XMLConstants.XML_NS_PREFIX.equals(prefix) && !XMLConstants.XML_NS_URI.equals(namespace)) { throw new DomEx(DomEx.NAMESPACE_ERR, "xml namespace is always " + XMLConstants.XML_NS_URI, this, 0); } if (XMLConstants.XMLNS_ATTRIBUTE.equals(prefix)) { if (namespace != null || getNodeType() != ATTRIBUTE_NODE) { throw new DomEx(DomEx.NAMESPACE_ERR, "xmlns attribute prefix is reserved", this, 0); } } else if (getNodeType () == ATTRIBUTE_NODE && (XMLConstants.XMLNS_ATTRIBUTE.equals(name) || name.startsWith("xmlns:"))) { throw new DomEx(DomEx.NAMESPACE_ERR, "namespace declarations can't change names", this, 0); } this.prefix = prefix.intern(); }
15,040
public final void setPrefix(String prefix) { if (readonly) { throw new DomEx(DomEx.NO_MODIFICATION_ALLOWED_ERR); } if (prefix == null) { name = localName; return; } else if (namespace == null) { throw new DomEx(DomEx.NAMESPACE_ERR, "can't set prefix, node has no namespace URI", this, 0); } DomDocument.checkName(prefix, "1.1".equals(owner.getXmlVersion())); if (prefix.indexOf (':') != -1) { throw new DomEx(DomEx.NAMESPACE_ERR, "illegal prefix " + prefix, this, 0); } if (XMLConstants.XML_NS_PREFIX.equals(prefix) && !XMLConstants.XML_NS_URI.equals(namespace)) { throw new DomEx(DomEx.NAMESPACE_ERR, "xml namespace is always " + XMLConstants.XML_NS_URI, this, 0); } if (XMLConstants.XMLNS_ATTRIBUTE.equals(prefix)) { if (namespace != null || getNodeType() != ATTRIBUTE_NODE) { throw new DomEx(DomEx.NAMESPACE_ERR, "xmlns attribute prefix is reserved", this, 0); } } else if (getNodeType () == ATTRIBUTE_NODE && (XMLConstants.XMLNS_ATTRIBUTE.equals(name) || name.startsWith("xmlns:"))) { throw new DomEx(DomEx.NAMESPACE_ERR, "namespace declarations can't change names", this, 0); } this.prefix = prefix.intern(); }
public final void setPrefix(String prefix) { if (readonly) { throw new DomEx(DomEx.NO_MODIFICATION_ALLOWED_ERR); } if (prefix == null) { name = localName; return; } else if (namespace == null) { throw new DomDOMException(DOMException.NAMESPACE_ERR, "can't set prefix, node has no namespace URI", this, 0); } DomDocument.checkName(prefix, "1.1".equals(owner.getXmlVersion())); if (prefix.indexOf (':') != -1) { throw new DomDOMException(DOMException.NAMESPACE_ERR, "illegal prefix " + prefix, this, 0); } if (XMLConstants.XML_NS_PREFIX.equals(prefix) && !XMLConstants.XML_NS_URI.equals(namespace)) { throw new DomDOMException(DOMException.NAMESPACE_ERR, "xml namespace is always " + XMLConstants.XML_NS_URI, this, 0); } if (XMLConstants.XMLNS_ATTRIBUTE.equals(prefix)) { if (namespace != null || getNodeType() != ATTRIBUTE_NODE) { throw new DomDOMException(DOMException.NAMESPACE_ERR, "xmlns attribute prefix is reserved", this, 0); } } else if (getNodeType () == ATTRIBUTE_NODE && (XMLConstants.XMLNS_ATTRIBUTE.equals(name) || name.startsWith("xmlns:"))) { throw new DomDOMException(DOMException.NAMESPACE_ERR, "namespace declarations can't change names", this, 0); } this.prefix = prefix.intern(); }
15,041
public final void setPrefix(String prefix) { if (readonly) { throw new DomEx(DomEx.NO_MODIFICATION_ALLOWED_ERR); } if (prefix == null) { name = localName; return; } else if (namespace == null) { throw new DomEx(DomEx.NAMESPACE_ERR, "can't set prefix, node has no namespace URI", this, 0); } DomDocument.checkName(prefix, "1.1".equals(owner.getXmlVersion())); if (prefix.indexOf (':') != -1) { throw new DomEx(DomEx.NAMESPACE_ERR, "illegal prefix " + prefix, this, 0); } if (XMLConstants.XML_NS_PREFIX.equals(prefix) && !XMLConstants.XML_NS_URI.equals(namespace)) { throw new DomEx(DomEx.NAMESPACE_ERR, "xml namespace is always " + XMLConstants.XML_NS_URI, this, 0); } if (XMLConstants.XMLNS_ATTRIBUTE.equals(prefix)) { if (namespace != null || getNodeType() != ATTRIBUTE_NODE) { throw new DomEx(DomEx.NAMESPACE_ERR, "xmlns attribute prefix is reserved", this, 0); } } else if (getNodeType () == ATTRIBUTE_NODE && (XMLConstants.XMLNS_ATTRIBUTE.equals(name) || name.startsWith("xmlns:"))) { throw new DomEx(DomEx.NAMESPACE_ERR, "namespace declarations can't change names", this, 0); } this.prefix = prefix.intern(); }
public final void setPrefix(String prefix) { if (readonly) { throw new DomEx(DomEx.NO_MODIFICATION_ALLOWED_ERR); } if (prefix == null) { name = localName; return; } else if (namespace == null) { throw new DomDOMException(DOMException.NAMESPACE_ERR, "can't set prefix, node has no namespace URI", this, 0); } DomDocument.checkName(prefix, "1.1".equals(owner.getXmlVersion())); if (prefix.indexOf (':') != -1) { throw new DomDOMException(DOMException.NAMESPACE_ERR, "illegal prefix " + prefix, this, 0); } if (XMLConstants.XML_NS_PREFIX.equals(prefix) && !XMLConstants.XML_NS_URI.equals(namespace)) { throw new DomDOMException(DOMException.NAMESPACE_ERR, "xml namespace is always " + XMLConstants.XML_NS_URI, this, 0); } if (XMLConstants.XMLNS_ATTRIBUTE.equals(prefix)) { if (namespace != null || getNodeType() != ATTRIBUTE_NODE) { throw new DomDOMException(DOMException.NAMESPACE_ERR, "xmlns attribute prefix is reserved", this, 0); } } else if (getNodeType () == ATTRIBUTE_NODE && (XMLConstants.XMLNS_ATTRIBUTE.equals(name) || name.startsWith("xmlns:"))) { throw new DomDOMException(DOMException.NAMESPACE_ERR, "namespace declarations can't change names", this, 0); } this.prefix = prefix.intern(); }
15,042
public final void setPrefix(String prefix) { if (readonly) { throw new DomEx(DomEx.NO_MODIFICATION_ALLOWED_ERR); } if (prefix == null) { name = localName; return; } else if (namespace == null) { throw new DomEx(DomEx.NAMESPACE_ERR, "can't set prefix, node has no namespace URI", this, 0); } DomDocument.checkName(prefix, "1.1".equals(owner.getXmlVersion())); if (prefix.indexOf (':') != -1) { throw new DomEx(DomEx.NAMESPACE_ERR, "illegal prefix " + prefix, this, 0); } if (XMLConstants.XML_NS_PREFIX.equals(prefix) && !XMLConstants.XML_NS_URI.equals(namespace)) { throw new DomEx(DomEx.NAMESPACE_ERR, "xml namespace is always " + XMLConstants.XML_NS_URI, this, 0); } if (XMLConstants.XMLNS_ATTRIBUTE.equals(prefix)) { if (namespace != null || getNodeType() != ATTRIBUTE_NODE) { throw new DomEx(DomEx.NAMESPACE_ERR, "xmlns attribute prefix is reserved", this, 0); } } else if (getNodeType () == ATTRIBUTE_NODE && (XMLConstants.XMLNS_ATTRIBUTE.equals(name) || name.startsWith("xmlns:"))) { throw new DomEx(DomEx.NAMESPACE_ERR, "namespace declarations can't change names", this, 0); } this.prefix = prefix.intern(); }
public final void setPrefix(String prefix) { if (readonly) { throw new DomEx(DomEx.NO_MODIFICATION_ALLOWED_ERR); } if (prefix == null) { name = localName; return; } else if (namespace == null) { throw new DomDOMException(DOMException.NAMESPACE_ERR, "can't set prefix, node has no namespace URI", this, 0); } DomDocument.checkName(prefix, "1.1".equals(owner.getXmlVersion())); if (prefix.indexOf (':') != -1) { throw new DomDOMException(DOMException.NAMESPACE_ERR, "illegal prefix " + prefix, this, 0); } if (XMLConstants.XML_NS_PREFIX.equals(prefix) && !XMLConstants.XML_NS_URI.equals(namespace)) { throw new DomDOMException(DOMException.NAMESPACE_ERR, "xml namespace is always " + XMLConstants.XML_NS_URI, this, 0); } if (XMLConstants.XMLNS_ATTRIBUTE.equals(prefix)) { if (namespace != null || getNodeType() != ATTRIBUTE_NODE) { throw new DomDOMException(DOMException.NAMESPACE_ERR, "xmlns attribute prefix is reserved", this, 0); } } else if (getNodeType () == ATTRIBUTE_NODE && (XMLConstants.XMLNS_ATTRIBUTE.equals(name) || name.startsWith("xmlns:"))) { throw new DomDOMException(DOMException.NAMESPACE_ERR, "namespace declarations can't change names", this, 0); } this.prefix = prefix.intern(); }
15,043
public final void setPrefix(String prefix) { if (readonly) { throw new DomEx(DomEx.NO_MODIFICATION_ALLOWED_ERR); } if (prefix == null) { name = localName; return; } else if (namespace == null) { throw new DomEx(DomEx.NAMESPACE_ERR, "can't set prefix, node has no namespace URI", this, 0); } DomDocument.checkName(prefix, "1.1".equals(owner.getXmlVersion())); if (prefix.indexOf (':') != -1) { throw new DomEx(DomEx.NAMESPACE_ERR, "illegal prefix " + prefix, this, 0); } if (XMLConstants.XML_NS_PREFIX.equals(prefix) && !XMLConstants.XML_NS_URI.equals(namespace)) { throw new DomEx(DomEx.NAMESPACE_ERR, "xml namespace is always " + XMLConstants.XML_NS_URI, this, 0); } if (XMLConstants.XMLNS_ATTRIBUTE.equals(prefix)) { if (namespace != null || getNodeType() != ATTRIBUTE_NODE) { throw new DomEx(DomEx.NAMESPACE_ERR, "xmlns attribute prefix is reserved", this, 0); } } else if (getNodeType () == ATTRIBUTE_NODE && (XMLConstants.XMLNS_ATTRIBUTE.equals(name) || name.startsWith("xmlns:"))) { throw new DomEx(DomEx.NAMESPACE_ERR, "namespace declarations can't change names", this, 0); } this.prefix = prefix.intern(); }
public final void setPrefix(String prefix) { if (readonly) { throw new DomEx(DomEx.NO_MODIFICATION_ALLOWED_ERR); } if (prefix == null) { name = localName; return; } else if (namespace == null) { throw new DomEx(DomEx.NAMESPACE_ERR, "can't set prefix, node has no namespace URI", this, 0); } DomDocument.checkName(prefix, "1.1".equals(owner.getXmlVersion())); if (prefix.indexOf (':') != -1) { throw new DomEx(DomEx.NAMESPACE_ERR, "illegal prefix " + prefix, this, 0); } if (XMLConstants.XML_NS_PREFIX.equals(prefix) && !XMLConstants.XML_NS_URI.equals(namespace)) { throw new DomEx(DomEx.NAMESPACE_ERR, "xml namespace is always " + XMLConstants.XML_NS_URI, this, 0); } if (XMLConstants.XMLNS_ATTRIBUTE.equals(prefix)) { if (namespace != null || getNodeType() != ATTRIBUTE_NODE) { throw new DomEx(DomEx.NAMESPACE_ERR, "xmlns attribute prefix is reserved", this, 0); } } else if (getNodeType () == ATTRIBUTE_NODE && (XMLConstants.XMLNS_ATTRIBUTE.equals(name) || name.startsWith("xmlns:"))) { throw new DomEx(DomEx.NAMESPACE_ERR, "namespace declarations can't change names", this, 0); } this.prefix = prefix.intern(); }
15,044
public final void setPrefix(String prefix) { if (readonly) { throw new DomEx(DomEx.NO_MODIFICATION_ALLOWED_ERR); } if (prefix == null) { name = localName; return; } else if (namespace == null) { throw new DomEx(DomEx.NAMESPACE_ERR, "can't set prefix, node has no namespace URI", this, 0); } DomDocument.checkName(prefix, "1.1".equals(owner.getXmlVersion())); if (prefix.indexOf (':') != -1) { throw new DomEx(DomEx.NAMESPACE_ERR, "illegal prefix " + prefix, this, 0); } if (XMLConstants.XML_NS_PREFIX.equals(prefix) && !XMLConstants.XML_NS_URI.equals(namespace)) { throw new DomEx(DomEx.NAMESPACE_ERR, "xml namespace is always " + XMLConstants.XML_NS_URI, this, 0); } if (XMLConstants.XMLNS_ATTRIBUTE.equals(prefix)) { if (namespace != null || getNodeType() != ATTRIBUTE_NODE) { throw new DomEx(DomEx.NAMESPACE_ERR, "xmlns attribute prefix is reserved", this, 0); } } else if (getNodeType () == ATTRIBUTE_NODE && (XMLConstants.XMLNS_ATTRIBUTE.equals(name) || name.startsWith("xmlns:"))) { throw new DomEx(DomEx.NAMESPACE_ERR, "namespace declarations can't change names", this, 0); } this.prefix = prefix.intern(); }
public final void setPrefix(String prefix) { if (readonly) { throw new DomEx(DomEx.NO_MODIFICATION_ALLOWED_ERR); } if (prefix == null) { name = localName; return; } else if (namespace == null) { throw new DomEx(DomEx.NAMESPACE_ERR, "can't set prefix, node has no namespace URI", this, 0); } DomDocument.checkName(prefix, "1.1".equals(owner.getXmlVersion())); if (prefix.indexOf (':') != -1) { throw new DomEx(DomEx.NAMESPACE_ERR, "illegal prefix " + prefix, this, 0); } if (XMLConstants.XML_NS_PREFIX.equals(prefix) && !XMLConstants.XML_NS_URI.equals(namespace)) { throw new DomEx(DomEx.NAMESPACE_ERR, "xml namespace is always " + XMLConstants.XML_NS_URI, this, 0); } if (XMLConstants.XMLNS_ATTRIBUTE.equals(prefix)) { if (namespace != null || getNodeType() != ATTRIBUTE_NODE) { throw new DomEx(DomEx.NAMESPACE_ERR, "xmlns attribute prefix is reserved", this, 0); } } else if (getNodeType () == ATTRIBUTE_NODE && (XMLConstants.XMLNS_ATTRIBUTE.equals(name) || name.startsWith("xmlns:"))) { throw new DomEx(DomEx.NAMESPACE_ERR, "namespace declarations can't change names", this, 0); } this.prefix = prefix.intern(); }
15,045
public void drawPolygon(Polygon polygon) { drawPolygon(polygon.xpoints, polygon.ypoints, polygon.npoints); }
public void drawPolygon(Polygon polygon) { drawPolygon(polygon.xpoints, polygon.ypoints, polygon.npoints); }
15,047
protected final void handleStartTag(TagElement tag) { parser.handleStartTag(tag); htmlAttributeSet attributes = gnu.getAttributes(); if (tag.fictional()) attributes.addAttribute(HTMLEditorKit.ParserCallback.IMPLIED, Boolean.TRUE ); callBack.handleStartTag(tag.getHTMLTag(), attributes, hTag.where.startPosition ); }
protected final void handleStartTag(TagElement tag) { parser.handleStartTag(tag); SimpleAttributeSet attributes = gnu.getAttributes(); if (tag.fictional()) attributes.addAttribute(HTMLEditorKit.ParserCallback.IMPLIED, Boolean.TRUE ); callBack.handleStartTag(tag.getHTMLTag(), attributes, hTag.where.startPosition ); }
15,048
public ClassNotFoundException(String s, Throwable ex) { super(s, ex); this.ex = ex; }
public ClassNotFoundException() { super(s, ex); this.ex = ex; }
15,049
public ClassNotFoundException(String s, Throwable ex) { super(s, ex); this.ex = ex; }
public ClassNotFoundException(String s, Throwable ex) { super(s, ex); this.ex = ex; }
15,050
protected void addImpl(Component comp, Object constraints, int index) { // If we're adding the rootPane (initialization stages) use super.add. // Otherwise pass the add onto the content pane. if (comp == rootPane) super.addImpl(comp, constraints, index); else { if (isRootPaneCheckingEnabled()) throw new Error("Do not use add() on JApplet directly. Use " + "getContentPane().add() instead"); getContentPane().add(comp, constraints, index); } }
protected void addImpl(Component comp, Object constraints, int index) { // If we're adding the rootPane (initialization stages) use super.add. // Otherwise pass the add onto the content pane. if (comp == rootPane) super.addImpl(comp, constraints, index); else { if (isRootPaneCheckingEnabled()) throw new Error("Do not use add() on JApplet directly. Use " + "getContentPane().add() instead"); getContentPane().add(comp, constraints, index); } }
15,051
protected void addImpl(Component comp, Object constraints, int index) { // If we're adding the rootPane (initialization stages) use super.add. // Otherwise pass the add onto the content pane. if (comp == rootPane) super.addImpl(comp, constraints, index); else { if (isRootPaneCheckingEnabled()) throw new Error("Do not use add() on JApplet directly. Use " + "getContentPane().add() instead"); getContentPane().add(comp, constraints, index); } }
protected void addImpl(Component comp, Object constraints, int index) { // If we're adding the rootPane (initialization stages) use super.add. // Otherwise pass the add onto the content pane. if (!initStageDone) super.addImpl(comp, constraints, index); else { if (isRootPaneCheckingEnabled()) throw new Error("Do not use add() on JApplet directly. Use " + "getContentPane().add() instead"); getContentPane().add(comp, constraints, index); } }
15,052
public Container getContentPane();
public Container getContentPane();
15,053
public Component getGlassPane();
public Component getGlassPane();
15,054
public JLayeredPane getLayeredPane();
public JLayeredPane getLayeredPane();
15,055
public JRootPane getRootPane();
public JRootPane getRootPane();
15,056
public void setContentPane(Container contentPane);
public void setContentPane(Container contentPane);
15,057
public void setGlassPane(Component glassPane);
public void setGlassPane(Component glassPane);
15,058
public void setLayeredPane(JLayeredPane layeredPane);
public void setLayeredPane(JLayeredPane layeredPane);
15,059
public TreeMap(Comparator<? super K> c) { comparator = c; fabricateTree(0); }
public TreeMap() { comparator = c; fabricateTree(0); }
15,060
public TreeMap(Comparator<? super K> c) { comparator = c; fabricateTree(0); }
public TreeMap(Comparator<? super K> c) { comparator = c; fabricateTree(0); }
15,061
public DecimalFormat() { this("#,##0.###"); }
public DecimalFormat() { this("#,##0.###"); }
15,062
public void applyLocalizedPattern(String pattern) { // JCL p. 638 claims this throws a ParseException but p. 629 // contradicts this. Empirical tests with patterns of "0,###.0" // and "#.#.#" corroborate the p. 629 statement that an // IllegalArgumentException is thrown. applyPatternWithSymbols(pattern, symbols); }
public void applyLocalizedPattern(String pattern) { // JCL p. 638 claims this throws a ParseException but p. 629 // contradicts this. Empirical tests with patterns of "0,###.0" // and "#.#.#" corroborate the p. 629 statement that an // IllegalArgumentException is thrown. applyPatternWithSymbols(pattern, symbols); }
15,063
public void applyLocalizedPattern(String pattern) { // JCL p. 638 claims this throws a ParseException but p. 629 // contradicts this. Empirical tests with patterns of "0,###.0" // and "#.#.#" corroborate the p. 629 statement that an // IllegalArgumentException is thrown. applyPatternWithSymbols(pattern, symbols); }
public void applyLocalizedPattern(String pattern) { // JCL p. 638 claims this throws a ParseException but p. 629 // contradicts this. Empirical tests with patterns of "0,###.0" // and "#.#.#" corroborate the p. 629 statement that an // IllegalArgumentException is thrown. applyPatternWithSymbols(pattern, symbols); }
15,064
public void applyPattern(String pattern) { // JCL p. 638 claims this throws a ParseException but p. 629 // contradicts this. Empirical tests with patterns of "0,###.0" // and "#.#.#" corroborate the p. 629 statement that an // IllegalArgumentException is thrown. applyPatternWithSymbols(pattern, nonLocalizedSymbols); }
public void applyPattern(String pattern) { // JCL p. 638 claims this throws a ParseException but p. 629 // contradicts this. Empirical tests with patterns of "0,###.0" // and "#.#.#" corroborate the p. 629 statement that an // IllegalArgumentException is thrown. applyPatternWithSymbols(pattern, nonLocalizedSymbols); }
15,065
public void applyPattern(String pattern) { // JCL p. 638 claims this throws a ParseException but p. 629 // contradicts this. Empirical tests with patterns of "0,###.0" // and "#.#.#" corroborate the p. 629 statement that an // IllegalArgumentException is thrown. applyPatternWithSymbols(pattern, nonLocalizedSymbols); }
public void applyPattern(String pattern) { // JCL p. 638 claims this throws a ParseException but p. 629 // contradicts this. Empirical tests with patterns of "0,###.0" // and "#.#.#" corroborate the p. 629 statement that an // IllegalArgumentException is thrown. applyPatternWithSymbols(pattern, nonLocalizedSymbols); }
15,066
private final void applyPatternWithSymbols(String pattern, DecimalFormatSymbols syms) { // Initialize to the state the parser expects. negativePrefix = ""; negativeSuffix = ""; positivePrefix = ""; positiveSuffix = ""; decimalSeparatorAlwaysShown = false; groupingSize = 0; minExponentDigits = 0; multiplier = 1; useExponentialNotation = false; groupingUsed = false; maximumFractionDigits = 0; maximumIntegerDigits = 309; minimumFractionDigits = 0; minimumIntegerDigits = 1; StringBuffer buf = new StringBuffer(); String patChars = patternChars(syms); int max = pattern.length(); int index = scanFix(pattern, 0, buf, patChars, syms, false); positivePrefix = buf.toString(); index = scanFormat(pattern, index, patChars, syms, true); index = scanFix(pattern, index, buf, patChars, syms, true); positiveSuffix = buf.toString(); if (index == pattern.length()) { // No negative info. negativePrefix = null; negativeSuffix = null; } else { if (pattern.charAt(index) != syms.getPatternSeparator()) throw new IllegalArgumentException("separator character " + "expected - index: " + index); index = scanFix(pattern, index + 1, buf, patChars, syms, false); negativePrefix = buf.toString(); // We parse the negative format for errors but we don't let // it side-effect this object. index = scanFormat(pattern, index, patChars, syms, false); index = scanFix(pattern, index, buf, patChars, syms, true); negativeSuffix = buf.toString(); if (index != pattern.length()) throw new IllegalArgumentException("end of pattern expected " + "- index: " + index); } }
private final void applyPatternWithSymbols(String pattern, DecimalFormatSymbols syms) { // Initialize to the state the parser expects. negativePrefix = ""; negativeSuffix = ""; positivePrefix = ""; positiveSuffix = ""; decimalSeparatorAlwaysShown = false; groupingSize = 0; minExponentDigits = 0; multiplier = 1; useExponentialNotation = false; groupingUsed = false; maximumFractionDigits = 0; maximumIntegerDigits = 309; minimumFractionDigits = 0; minimumIntegerDigits = 1; StringBuffer buf = new StringBuffer(); String patChars = patternChars(syms); int max = pattern.length(); int index = scanFix(pattern, 0, buf, patChars, syms, false); positivePrefix = buf.toString(); index = scanFormat(pattern, index, patChars, syms, true); index = scanFix(pattern, index, buf, patChars, syms, true); positiveSuffix = buf.toString(); if (index == pattern.length()) { // No negative info. negativePrefix = null; negativeSuffix = null; } else { if (pattern.charAt(index) != syms.getPatternSeparator()) throw new IllegalArgumentException("separator character " + "expected - index: " + index); index = scanFix(pattern, index + 1, buf, patChars, syms, false); negativePrefix = buf.toString(); // We parse the negative format for errors but we don't let // it side-effect this object. index = scanFormat(pattern, index, patChars, syms, false); index = scanFix(pattern, index, buf, patChars, syms, true); negativeSuffix = buf.toString(); if (index != pattern.length()) throw new IllegalArgumentException("end of pattern expected " + "- index: " + index); } }
15,067
private final void applyPatternWithSymbols(String pattern, DecimalFormatSymbols syms) { // Initialize to the state the parser expects. negativePrefix = ""; negativeSuffix = ""; positivePrefix = ""; positiveSuffix = ""; decimalSeparatorAlwaysShown = false; groupingSize = 0; minExponentDigits = 0; multiplier = 1; useExponentialNotation = false; groupingUsed = false; maximumFractionDigits = 0; maximumIntegerDigits = 309; minimumFractionDigits = 0; minimumIntegerDigits = 1; StringBuffer buf = new StringBuffer(); String patChars = patternChars(syms); int max = pattern.length(); int index = scanFix(pattern, 0, buf, patChars, syms, false); positivePrefix = buf.toString(); index = scanFormat(pattern, index, patChars, syms, true); index = scanFix(pattern, index, buf, patChars, syms, true); positiveSuffix = buf.toString(); if (index == pattern.length()) { // No negative info. negativePrefix = null; negativeSuffix = null; } else { if (pattern.charAt(index) != syms.getPatternSeparator()) throw new IllegalArgumentException("separator character " + "expected - index: " + index); index = scanFix(pattern, index + 1, buf, patChars, syms, false); negativePrefix = buf.toString(); // We parse the negative format for errors but we don't let // it side-effect this object. index = scanFormat(pattern, index, patChars, syms, false); index = scanFix(pattern, index, buf, patChars, syms, true); negativeSuffix = buf.toString(); if (index != pattern.length()) throw new IllegalArgumentException("end of pattern expected " + "- index: " + index); } }
private final void applyPatternWithSymbols(String pattern, DecimalFormatSymbols syms) { // Initialize to the state the parser expects. negativePrefix = ""; negativeSuffix = ""; positivePrefix = ""; positiveSuffix = ""; decimalSeparatorAlwaysShown = false; groupingSize = 0; minExponentDigits = 0; multiplier = 1; useExponentialNotation = false; groupingUsed = false; maximumFractionDigits = 0; maximumIntegerDigits = 309; minimumFractionDigits = 0; minimumIntegerDigits = 1; StringBuffer buf = new StringBuffer(); String patChars = patternChars(syms); int max = pattern.length(); int index = scanFix(pattern, 0, buf, patChars, syms, false); positivePrefix = buf.toString(); index = scanFormat(pattern, index, patChars, syms, true); index = scanFix(pattern, index, buf, patChars, syms, true); positiveSuffix = buf.toString(); if (index == pattern.length()) { // No negative info. negativePrefix = null; negativeSuffix = null; } else { if (pattern.charAt(index) != syms.getPatternSeparator()) throw new IllegalArgumentException("separator character " + "expected - index: " + index); index = scanFix(pattern, index + 1, buf, patChars, syms, false); negativePrefix = buf.toString(); // We parse the negative format for errors but we don't let // it side-effect this object. index = scanFormat(pattern, index, patChars, syms, false); index = scanFix(pattern, index, buf, patChars, syms, true); negativeSuffix = buf.toString(); if (index != pattern.length()) throw new IllegalArgumentException("end of pattern expected " + "- index: " + index); } }
15,068
private final void applyPatternWithSymbols(String pattern, DecimalFormatSymbols syms) { // Initialize to the state the parser expects. negativePrefix = ""; negativeSuffix = ""; positivePrefix = ""; positiveSuffix = ""; decimalSeparatorAlwaysShown = false; groupingSize = 0; minExponentDigits = 0; multiplier = 1; useExponentialNotation = false; groupingUsed = false; maximumFractionDigits = 0; maximumIntegerDigits = 309; minimumFractionDigits = 0; minimumIntegerDigits = 1; StringBuffer buf = new StringBuffer(); String patChars = patternChars(syms); int max = pattern.length(); int index = scanFix(pattern, 0, buf, patChars, syms, false); positivePrefix = buf.toString(); index = scanFormat(pattern, index, patChars, syms, true); index = scanFix(pattern, index, buf, patChars, syms, true); positiveSuffix = buf.toString(); if (index == pattern.length()) { // No negative info. negativePrefix = null; negativeSuffix = null; } else { if (pattern.charAt(index) != syms.getPatternSeparator()) throw new IllegalArgumentException("separator character " + "expected - index: " + index); index = scanFix(pattern, index + 1, buf, patChars, syms, false); negativePrefix = buf.toString(); // We parse the negative format for errors but we don't let // it side-effect this object. index = scanFormat(pattern, index, patChars, syms, false); index = scanFix(pattern, index, buf, patChars, syms, true); negativeSuffix = buf.toString(); if (index != pattern.length()) throw new IllegalArgumentException("end of pattern expected " + "- index: " + index); } }
private final void applyPatternWithSymbols(String pattern, DecimalFormatSymbols syms) { // Initialize to the state the parser expects. negativePrefix = ""; negativeSuffix = ""; positivePrefix = ""; positiveSuffix = ""; decimalSeparatorAlwaysShown = false; groupingSize = 0; minExponentDigits = 0; multiplier = 1; useExponentialNotation = false; groupingUsed = false; maximumFractionDigits = 0; maximumIntegerDigits = 309; minimumFractionDigits = 0; minimumIntegerDigits = 1; StringBuffer buf = new StringBuffer(); String patChars = patternChars(syms); int max = pattern.length(); int index = scanFix(pattern, 0, buf, patChars, syms, false); positivePrefix = buf.toString(); index = scanFormat(pattern, index, patChars, syms, true); index = scanFix(pattern, index, buf, patChars, syms, true); positiveSuffix = buf.toString(); if (index == pattern.length()) { // No negative info. negativePrefix = null; negativeSuffix = null; } else { if (pattern.charAt(index) != syms.getPatternSeparator()) throw new IllegalArgumentException("separator character " + "expected - index: " + index); index = scanFix(pattern, index + 1, buf, patChars, syms, false); negativePrefix = buf.toString(); // We parse the negative format for errors but we don't let // it side-effect this object. index = scanFormat(pattern, index, patChars, syms, false); index = scanFix(pattern, index, buf, patChars, syms, true); negativeSuffix = buf.toString(); if (index != pattern.length()) throw new IllegalArgumentException("end of pattern expected " + "- index: " + index); } }
15,069
private final void applyPatternWithSymbols(String pattern, DecimalFormatSymbols syms) { // Initialize to the state the parser expects. negativePrefix = ""; negativeSuffix = ""; positivePrefix = ""; positiveSuffix = ""; decimalSeparatorAlwaysShown = false; groupingSize = 0; minExponentDigits = 0; multiplier = 1; useExponentialNotation = false; groupingUsed = false; maximumFractionDigits = 0; maximumIntegerDigits = 309; minimumFractionDigits = 0; minimumIntegerDigits = 1; StringBuffer buf = new StringBuffer(); String patChars = patternChars(syms); int max = pattern.length(); int index = scanFix(pattern, 0, buf, patChars, syms, false); positivePrefix = buf.toString(); index = scanFormat(pattern, index, patChars, syms, true); index = scanFix(pattern, index, buf, patChars, syms, true); positiveSuffix = buf.toString(); if (index == pattern.length()) { // No negative info. negativePrefix = null; negativeSuffix = null; } else { if (pattern.charAt(index) != syms.getPatternSeparator()) throw new IllegalArgumentException("separator character " + "expected - index: " + index); index = scanFix(pattern, index + 1, buf, patChars, syms, false); negativePrefix = buf.toString(); // We parse the negative format for errors but we don't let // it side-effect this object. index = scanFormat(pattern, index, patChars, syms, false); index = scanFix(pattern, index, buf, patChars, syms, true); negativeSuffix = buf.toString(); if (index != pattern.length()) throw new IllegalArgumentException("end of pattern expected " + "- index: " + index); } }
private final void applyPatternWithSymbols(String pattern, DecimalFormatSymbols syms) { // Initialize to the state the parser expects. negativePrefix = ""; negativeSuffix = ""; positivePrefix = ""; positiveSuffix = ""; decimalSeparatorAlwaysShown = false; groupingSize = 0; minExponentDigits = 0; multiplier = 1; useExponentialNotation = false; groupingUsed = false; maximumFractionDigits = 0; maximumIntegerDigits = 309; minimumFractionDigits = 0; minimumIntegerDigits = 1; StringBuffer buf = new StringBuffer(); String patChars = patternChars(syms); int max = pattern.length(); int index = scanFix(pattern, 0, buf, patChars, syms, false); positivePrefix = buf.toString(); index = scanFormat(pattern, index, patChars, syms, true); index = scanFix(pattern, index, buf, patChars, syms, true); positiveSuffix = buf.toString(); if (index == pattern.length()) { // No negative info. negativePrefix = null; negativeSuffix = null; } else { if (pattern.charAt(index) != syms.getPatternSeparator()) throw new IllegalArgumentException("separator character " + "expected - index: " + index); index = scanFix(pattern, index + 1, buf, patChars, syms, false); negativePrefix = buf.toString(); // We parse the negative format for errors but we don't let // it side-effect this object. index = scanFormat(pattern, index, patChars, syms, false); index = scanFix(pattern, index, buf, patChars, syms, true); negativeSuffix = buf.toString(); if (index != pattern.length()) throw new IllegalArgumentException("end of pattern expected " + "- index: " + index); } }
15,070
private final void applyPatternWithSymbols(String pattern, DecimalFormatSymbols syms) { // Initialize to the state the parser expects. negativePrefix = ""; negativeSuffix = ""; positivePrefix = ""; positiveSuffix = ""; decimalSeparatorAlwaysShown = false; groupingSize = 0; minExponentDigits = 0; multiplier = 1; useExponentialNotation = false; groupingUsed = false; maximumFractionDigits = 0; maximumIntegerDigits = 309; minimumFractionDigits = 0; minimumIntegerDigits = 1; StringBuffer buf = new StringBuffer(); String patChars = patternChars(syms); int max = pattern.length(); int index = scanFix(pattern, 0, buf, patChars, syms, false); positivePrefix = buf.toString(); index = scanFormat(pattern, index, patChars, syms, true); index = scanFix(pattern, index, buf, patChars, syms, true); positiveSuffix = buf.toString(); if (index == pattern.length()) { // No negative info. negativePrefix = null; negativeSuffix = null; } else { if (pattern.charAt(index) != syms.getPatternSeparator()) throw new IllegalArgumentException("separator character " + "expected - index: " + index); index = scanFix(pattern, index + 1, buf, patChars, syms, false); negativePrefix = buf.toString(); // We parse the negative format for errors but we don't let // it side-effect this object. index = scanFormat(pattern, index, patChars, syms, false); index = scanFix(pattern, index, buf, patChars, syms, true); negativeSuffix = buf.toString(); if (index != pattern.length()) throw new IllegalArgumentException("end of pattern expected " + "- index: " + index); } }
private final void applyPatternWithSymbols(String pattern, DecimalFormatSymbols syms) { // Initialize to the state the parser expects. negativePrefix = ""; negativeSuffix = ""; positivePrefix = ""; positiveSuffix = ""; decimalSeparatorAlwaysShown = false; groupingSize = 0; minExponentDigits = 0; multiplier = 1; useExponentialNotation = false; groupingUsed = false; maximumFractionDigits = 0; maximumIntegerDigits = 309; minimumFractionDigits = 0; minimumIntegerDigits = 1; StringBuffer buf = new StringBuffer(); String patChars = patternChars(syms); int max = pattern.length(); int index = scanFix(pattern, 0, buf, patChars, syms, false); positivePrefix = buf.toString(); index = scanFormat(pattern, index, patChars, syms, true); index = scanFix(pattern, index, buf, patChars, syms, true); positiveSuffix = buf.toString(); if (index == pattern.length()) { // No negative info. negativePrefix = null; negativeSuffix = null; } else { if (pattern.charAt(index) != syms.getPatternSeparator()) throw new IllegalArgumentException("separator character " + "expected - index: " + index); index = scanFix(pattern, index + 1, buf, patChars, syms, false); negativePrefix = buf.toString(); // We parse the negative format for errors but we don't let // it side-effect this object. index = scanFormat(pattern, index, patChars, syms, false); index = scanFix(pattern, index, buf, patChars, syms, true); negativeSuffix = buf.toString(); if (index != pattern.length()) throw new IllegalArgumentException("end of pattern expected " + "- index: " + index); } }
15,071
private final void applyPatternWithSymbols(String pattern, DecimalFormatSymbols syms) { // Initialize to the state the parser expects. negativePrefix = ""; negativeSuffix = ""; positivePrefix = ""; positiveSuffix = ""; decimalSeparatorAlwaysShown = false; groupingSize = 0; minExponentDigits = 0; multiplier = 1; useExponentialNotation = false; groupingUsed = false; maximumFractionDigits = 0; maximumIntegerDigits = 309; minimumFractionDigits = 0; minimumIntegerDigits = 1; StringBuffer buf = new StringBuffer(); String patChars = patternChars(syms); int max = pattern.length(); int index = scanFix(pattern, 0, buf, patChars, syms, false); positivePrefix = buf.toString(); index = scanFormat(pattern, index, patChars, syms, true); index = scanFix(pattern, index, buf, patChars, syms, true); positiveSuffix = buf.toString(); if (index == pattern.length()) { // No negative info. negativePrefix = null; negativeSuffix = null; } else { if (pattern.charAt(index) != syms.getPatternSeparator()) throw new IllegalArgumentException("separator character " + "expected - index: " + index); index = scanFix(pattern, index + 1, buf, patChars, syms, false); negativePrefix = buf.toString(); // We parse the negative format for errors but we don't let // it side-effect this object. index = scanFormat(pattern, index, patChars, syms, false); index = scanFix(pattern, index, buf, patChars, syms, true); negativeSuffix = buf.toString(); if (index != pattern.length()) throw new IllegalArgumentException("end of pattern expected " + "- index: " + index); } }
private final void applyPatternWithSymbols(String pattern, DecimalFormatSymbols syms) { // Initialize to the state the parser expects. negativePrefix = ""; negativeSuffix = ""; positivePrefix = ""; positiveSuffix = ""; decimalSeparatorAlwaysShown = false; groupingSize = 0; minExponentDigits = 0; multiplier = 1; useExponentialNotation = false; groupingUsed = false; maximumFractionDigits = 0; maximumIntegerDigits = 309; minimumFractionDigits = 0; minimumIntegerDigits = 1; StringBuffer buf = new StringBuffer(); String patChars = patternChars(syms); int max = pattern.length(); int index = scanFix(pattern, 0, buf, patChars, syms, false); positivePrefix = buf.toString(); index = scanFormat(pattern, index, patChars, syms, true); index = scanFix(pattern, index, buf, patChars, syms, true); positiveSuffix = buf.toString(); if (index == pattern.length()) { // No negative info. negativePrefix = null; negativeSuffix = null; } else { if (pattern.charAt(index) != syms.getPatternSeparator()) throw new IllegalArgumentException("separator character " + "expected - index: " + index); index = scanFix(pattern, index + 1, buf, patChars, syms, false); negativePrefix = buf.toString(); // We parse the negative format for errors but we don't let // it side-effect this object. index = scanFormat(pattern, index, patChars, syms, false); index = scanFix(pattern, index, buf, patChars, syms, true); negativeSuffix = buf.toString(); if (index != pattern.length()) throw new IllegalArgumentException("end of pattern expected " + "- index: " + index); } }
15,072
private final void applyPatternWithSymbols(String pattern, DecimalFormatSymbols syms) { // Initialize to the state the parser expects. negativePrefix = ""; negativeSuffix = ""; positivePrefix = ""; positiveSuffix = ""; decimalSeparatorAlwaysShown = false; groupingSize = 0; minExponentDigits = 0; multiplier = 1; useExponentialNotation = false; groupingUsed = false; maximumFractionDigits = 0; maximumIntegerDigits = 309; minimumFractionDigits = 0; minimumIntegerDigits = 1; StringBuffer buf = new StringBuffer(); String patChars = patternChars(syms); int max = pattern.length(); int index = scanFix(pattern, 0, buf, patChars, syms, false); positivePrefix = buf.toString(); index = scanFormat(pattern, index, patChars, syms, true); index = scanFix(pattern, index, buf, patChars, syms, true); positiveSuffix = buf.toString(); if (index == pattern.length()) { // No negative info. negativePrefix = null; negativeSuffix = null; } else { if (pattern.charAt(index) != syms.getPatternSeparator()) throw new IllegalArgumentException("separator character " + "expected - index: " + index); index = scanFix(pattern, index + 1, buf, patChars, syms, false); negativePrefix = buf.toString(); // We parse the negative format for errors but we don't let // it side-effect this object. index = scanFormat(pattern, index, patChars, syms, false); index = scanFix(pattern, index, buf, patChars, syms, true); negativeSuffix = buf.toString(); if (index != pattern.length()) throw new IllegalArgumentException("end of pattern expected " + "- index: " + index); } }
private final void applyPatternWithSymbols(String pattern, DecimalFormatSymbols syms) { // Initialize to the state the parser expects. negativePrefix = ""; negativeSuffix = ""; positivePrefix = ""; positiveSuffix = ""; decimalSeparatorAlwaysShown = false; groupingSize = 0; minExponentDigits = 0; multiplier = 1; useExponentialNotation = false; groupingUsed = false; maximumFractionDigits = 0; maximumIntegerDigits = 309; minimumFractionDigits = 0; minimumIntegerDigits = 1; StringBuffer buf = new StringBuffer(); String patChars = patternChars(syms); int max = pattern.length(); int index = scanFix(pattern, 0, buf, patChars, syms, false); positivePrefix = buf.toString(); index = scanFormat(pattern, index, patChars, syms, true); index = scanFix(pattern, index, buf, patChars, syms, true); positiveSuffix = buf.toString(); if (index == pattern.length()) { // No negative info. negativePrefix = null; negativeSuffix = null; } else { if (pattern.charAt(index) != syms.getPatternSeparator()) throw new IllegalArgumentException("separator character " + "expected - index: " + index); index = scanFix(pattern, index + 1, buf, patChars, syms, false); negativePrefix = buf.toString(); // We parse the negative format for errors but we don't let // it side-effect this object. index = scanFormat(pattern, index, patChars, syms, false); index = scanFix(pattern, index, buf, patChars, syms, true); negativeSuffix = buf.toString(); if (index != pattern.length()) throw new IllegalArgumentException("end of pattern expected " + "- index: " + index); } }
15,073
private final void applyPatternWithSymbols(String pattern, DecimalFormatSymbols syms) { // Initialize to the state the parser expects. negativePrefix = ""; negativeSuffix = ""; positivePrefix = ""; positiveSuffix = ""; decimalSeparatorAlwaysShown = false; groupingSize = 0; minExponentDigits = 0; multiplier = 1; useExponentialNotation = false; groupingUsed = false; maximumFractionDigits = 0; maximumIntegerDigits = 309; minimumFractionDigits = 0; minimumIntegerDigits = 1; StringBuffer buf = new StringBuffer(); String patChars = patternChars(syms); int max = pattern.length(); int index = scanFix(pattern, 0, buf, patChars, syms, false); positivePrefix = buf.toString(); index = scanFormat(pattern, index, patChars, syms, true); index = scanFix(pattern, index, buf, patChars, syms, true); positiveSuffix = buf.toString(); if (index == pattern.length()) { // No negative info. negativePrefix = null; negativeSuffix = null; } else { if (pattern.charAt(index) != syms.getPatternSeparator()) throw new IllegalArgumentException("separator character " + "expected - index: " + index); index = scanFix(pattern, index + 1, buf, patChars, syms, false); negativePrefix = buf.toString(); // We parse the negative format for errors but we don't let // it side-effect this object. index = scanFormat(pattern, index, patChars, syms, false); index = scanFix(pattern, index, buf, patChars, syms, true); negativeSuffix = buf.toString(); if (index != pattern.length()) throw new IllegalArgumentException("end of pattern expected " + "- index: " + index); } }
private final void applyPatternWithSymbols(String pattern, DecimalFormatSymbols syms) { // Initialize to the state the parser expects. negativePrefix = ""; negativeSuffix = ""; positivePrefix = ""; positiveSuffix = ""; decimalSeparatorAlwaysShown = false; groupingSize = 0; minExponentDigits = 0; multiplier = 1; useExponentialNotation = false; groupingUsed = false; maximumFractionDigits = 0; maximumIntegerDigits = 309; minimumFractionDigits = 0; minimumIntegerDigits = 1; StringBuffer buf = new StringBuffer(); String patChars = patternChars(syms); int max = pattern.length(); int index = scanFix(pattern, 0, buf, patChars, syms, false); positivePrefix = buf.toString(); index = scanFormat(pattern, index, patChars, syms, true); index = scanFix(pattern, index, buf, patChars, syms, true); positiveSuffix = buf.toString(); if (index == pattern.length()) { // No negative info. negativePrefix = null; negativeSuffix = null; } else { if (pattern.charAt(index) != syms.getPatternSeparator()) throw new IllegalArgumentException("separator character " + "expected - index: " + index); index = scanFix(pattern, index + 1, buf, patChars, syms, false); negativePrefix = buf.toString(); // We parse the negative format for errors but we don't let // it side-effect this object. index = scanFormat(pattern, index, patChars, syms, false); index = scanFix(pattern, index, buf, patChars, syms, true); negativeSuffix = buf.toString(); if (index != pattern.length()) throw new IllegalArgumentException("end of pattern expected " + "- index: " + index); } }
15,074
private final void applyPatternWithSymbols(String pattern, DecimalFormatSymbols syms) { // Initialize to the state the parser expects. negativePrefix = ""; negativeSuffix = ""; positivePrefix = ""; positiveSuffix = ""; decimalSeparatorAlwaysShown = false; groupingSize = 0; minExponentDigits = 0; multiplier = 1; useExponentialNotation = false; groupingUsed = false; maximumFractionDigits = 0; maximumIntegerDigits = 309; minimumFractionDigits = 0; minimumIntegerDigits = 1; StringBuffer buf = new StringBuffer(); String patChars = patternChars(syms); int max = pattern.length(); int index = scanFix(pattern, 0, buf, patChars, syms, false); positivePrefix = buf.toString(); index = scanFormat(pattern, index, patChars, syms, true); index = scanFix(pattern, index, buf, patChars, syms, true); positiveSuffix = buf.toString(); if (index == pattern.length()) { // No negative info. negativePrefix = null; negativeSuffix = null; } else { if (pattern.charAt(index) != syms.getPatternSeparator()) throw new IllegalArgumentException("separator character " + "expected - index: " + index); index = scanFix(pattern, index + 1, buf, patChars, syms, false); negativePrefix = buf.toString(); // We parse the negative format for errors but we don't let // it side-effect this object. index = scanFormat(pattern, index, patChars, syms, false); index = scanFix(pattern, index, buf, patChars, syms, true); negativeSuffix = buf.toString(); if (index != pattern.length()) throw new IllegalArgumentException("end of pattern expected " + "- index: " + index); } }
private final void applyPatternWithSymbols(String pattern, DecimalFormatSymbols syms) { // Initialize to the state the parser expects. negativePrefix = ""; negativeSuffix = ""; positivePrefix = ""; positiveSuffix = ""; decimalSeparatorAlwaysShown = false; groupingSize = 0; minExponentDigits = 0; multiplier = 1; useExponentialNotation = false; groupingUsed = false; maximumFractionDigits = 0; maximumIntegerDigits = 309; minimumFractionDigits = 0; minimumIntegerDigits = 1; StringBuffer buf = new StringBuffer(); String patChars = patternChars(syms); int max = pattern.length(); int index = scanFix(pattern, 0, buf, patChars, syms, false); positivePrefix = buf.toString(); index = scanFormat(pattern, index, patChars, syms, true); index = scanFix(pattern, index, buf, patChars, syms, true); positiveSuffix = buf.toString(); if (index == pattern.length()) { // No negative info. negativePrefix = null; negativeSuffix = null; } else { if (pattern.charAt(index) != syms.getPatternSeparator()) throw new IllegalArgumentException("separator character " + "expected - index: " + index); index = scanFix(pattern, index + 1, buf, patChars, syms, false); negativePrefix = buf.toString(); // We parse the negative format for errors but we don't let // it side-effect this object. index = scanFormat(pattern, index, patChars, syms, false); index = scanFix(pattern, index, buf, patChars, syms, true); negativeSuffix = buf.toString(); if (index != pattern.length()) throw new IllegalArgumentException("end of pattern expected " + "- index: " + index); } }
15,075
private final void applyPatternWithSymbols(String pattern, DecimalFormatSymbols syms) { // Initialize to the state the parser expects. negativePrefix = ""; negativeSuffix = ""; positivePrefix = ""; positiveSuffix = ""; decimalSeparatorAlwaysShown = false; groupingSize = 0; minExponentDigits = 0; multiplier = 1; useExponentialNotation = false; groupingUsed = false; maximumFractionDigits = 0; maximumIntegerDigits = 309; minimumFractionDigits = 0; minimumIntegerDigits = 1; StringBuffer buf = new StringBuffer(); String patChars = patternChars(syms); int max = pattern.length(); int index = scanFix(pattern, 0, buf, patChars, syms, false); positivePrefix = buf.toString(); index = scanFormat(pattern, index, patChars, syms, true); index = scanFix(pattern, index, buf, patChars, syms, true); positiveSuffix = buf.toString(); if (index == pattern.length()) { // No negative info. negativePrefix = null; negativeSuffix = null; } else { if (pattern.charAt(index) != syms.getPatternSeparator()) throw new IllegalArgumentException("separator character " + "expected - index: " + index); index = scanFix(pattern, index + 1, buf, patChars, syms, false); negativePrefix = buf.toString(); // We parse the negative format for errors but we don't let // it side-effect this object. index = scanFormat(pattern, index, patChars, syms, false); index = scanFix(pattern, index, buf, patChars, syms, true); negativeSuffix = buf.toString(); if (index != pattern.length()) throw new IllegalArgumentException("end of pattern expected " + "- index: " + index); } }
private final void applyPatternWithSymbols(String pattern, DecimalFormatSymbols syms) { // Initialize to the state the parser expects. negativePrefix = ""; negativeSuffix = ""; positivePrefix = ""; positiveSuffix = ""; decimalSeparatorAlwaysShown = false; groupingSize = 0; minExponentDigits = 0; multiplier = 1; useExponentialNotation = false; groupingUsed = false; maximumFractionDigits = 0; maximumIntegerDigits = 309; minimumFractionDigits = 0; minimumIntegerDigits = 1; StringBuffer buf = new StringBuffer(); String patChars = patternChars(syms); int max = pattern.length(); int index = scanFix(pattern, 0, buf, patChars, syms, false); positivePrefix = buf.toString(); index = scanFormat(pattern, index, patChars, syms, true); index = scanFix(pattern, index, buf, patChars, syms, true); positiveSuffix = buf.toString(); if (index == pattern.length()) { // No negative info. negativePrefix = null; negativeSuffix = null; } else { if (pattern.charAt(index) != syms.getPatternSeparator()) throw new IllegalArgumentException("separator character " + "expected - index: " + index); index = scanFix(pattern, index + 1, buf, patChars, syms, false); negativePrefix = buf.toString(); // We parse the negative format for errors but we don't let // it side-effect this object. index = scanFormat(pattern, index, patChars, syms, false); index = scanFix(pattern, index, buf, patChars, syms, true); negativeSuffix = buf.toString(); if (index != pattern.length()) throw new IllegalArgumentException("end of pattern expected " + "- index: " + index); } }
15,076
private final void applyPatternWithSymbols(String pattern, DecimalFormatSymbols syms) { // Initialize to the state the parser expects. negativePrefix = ""; negativeSuffix = ""; positivePrefix = ""; positiveSuffix = ""; decimalSeparatorAlwaysShown = false; groupingSize = 0; minExponentDigits = 0; multiplier = 1; useExponentialNotation = false; groupingUsed = false; maximumFractionDigits = 0; maximumIntegerDigits = 309; minimumFractionDigits = 0; minimumIntegerDigits = 1; StringBuffer buf = new StringBuffer(); String patChars = patternChars(syms); int max = pattern.length(); int index = scanFix(pattern, 0, buf, patChars, syms, false); positivePrefix = buf.toString(); index = scanFormat(pattern, index, patChars, syms, true); index = scanFix(pattern, index, buf, patChars, syms, true); positiveSuffix = buf.toString(); if (index == pattern.length()) { // No negative info. negativePrefix = null; negativeSuffix = null; } else { if (pattern.charAt(index) != syms.getPatternSeparator()) throw new IllegalArgumentException("separator character " + "expected - index: " + index); index = scanFix(pattern, index + 1, buf, patChars, syms, false); negativePrefix = buf.toString(); // We parse the negative format for errors but we don't let // it side-effect this object. index = scanFormat(pattern, index, patChars, syms, false); index = scanFix(pattern, index, buf, patChars, syms, true); negativeSuffix = buf.toString(); if (index != pattern.length()) throw new IllegalArgumentException("end of pattern expected " + "- index: " + index); } }
private final void applyPatternWithSymbols(String pattern, DecimalFormatSymbols syms) { // Initialize to the state the parser expects. negativePrefix = ""; negativeSuffix = ""; positivePrefix = ""; positiveSuffix = ""; decimalSeparatorAlwaysShown = false; groupingSize = 0; minExponentDigits = 0; multiplier = 1; useExponentialNotation = false; groupingUsed = false; maximumFractionDigits = 0; maximumIntegerDigits = 309; minimumFractionDigits = 0; minimumIntegerDigits = 1; StringBuffer buf = new StringBuffer(); String patChars = patternChars(syms); int max = pattern.length(); int index = scanFix(pattern, 0, buf, patChars, syms, false); positivePrefix = buf.toString(); index = scanFormat(pattern, index, patChars, syms, true); index = scanFix(pattern, index, buf, patChars, syms, true); positiveSuffix = buf.toString(); if (index == pattern.length()) { // No negative info. negativePrefix = null; negativeSuffix = null; } else { if (pattern.charAt(index) != syms.getPatternSeparator()) throw new IllegalArgumentException("separator character " + "expected - index: " + index); index = scanFix(pattern, index + 1, buf, patChars, syms, false); negativePrefix = buf.toString(); // We parse the negative format for errors but we don't let // it side-effect this object. index = scanFormat(pattern, index, patChars, syms, false); index = scanFix(pattern, index, buf, patChars, syms, true); negativeSuffix = buf.toString(); if (index != pattern.length()) throw new IllegalArgumentException("end of pattern expected " + "- index: " + index); } }
15,077
private final void applyPatternWithSymbols(String pattern, DecimalFormatSymbols syms) { // Initialize to the state the parser expects. negativePrefix = ""; negativeSuffix = ""; positivePrefix = ""; positiveSuffix = ""; decimalSeparatorAlwaysShown = false; groupingSize = 0; minExponentDigits = 0; multiplier = 1; useExponentialNotation = false; groupingUsed = false; maximumFractionDigits = 0; maximumIntegerDigits = 309; minimumFractionDigits = 0; minimumIntegerDigits = 1; StringBuffer buf = new StringBuffer(); String patChars = patternChars(syms); int max = pattern.length(); int index = scanFix(pattern, 0, buf, patChars, syms, false); positivePrefix = buf.toString(); index = scanFormat(pattern, index, patChars, syms, true); index = scanFix(pattern, index, buf, patChars, syms, true); positiveSuffix = buf.toString(); if (index == pattern.length()) { // No negative info. negativePrefix = null; negativeSuffix = null; } else { if (pattern.charAt(index) != syms.getPatternSeparator()) throw new IllegalArgumentException("separator character " + "expected - index: " + index); index = scanFix(pattern, index + 1, buf, patChars, syms, false); negativePrefix = buf.toString(); // We parse the negative format for errors but we don't let // it side-effect this object. index = scanFormat(pattern, index, patChars, syms, false); index = scanFix(pattern, index, buf, patChars, syms, true); negativeSuffix = buf.toString(); if (index != pattern.length()) throw new IllegalArgumentException("end of pattern expected " + "- index: " + index); } }
private final void applyPatternWithSymbols(String pattern, DecimalFormatSymbols syms) { // Initialize to the state the parser expects. negativePrefix = ""; negativeSuffix = ""; positivePrefix = ""; positiveSuffix = ""; decimalSeparatorAlwaysShown = false; groupingSize = 0; minExponentDigits = 0; multiplier = 1; useExponentialNotation = false; groupingUsed = false; maximumFractionDigits = 0; maximumIntegerDigits = 309; minimumFractionDigits = 0; minimumIntegerDigits = 1; StringBuffer buf = new StringBuffer(); String patChars = patternChars(syms); int max = pattern.length(); int index = scanFix(pattern, 0, buf, patChars, syms, false); positivePrefix = buf.toString(); index = scanFormat(pattern, index, patChars, syms, true); index = scanFix(pattern, index, buf, patChars, syms, true); positiveSuffix = buf.toString(); if (index == pattern.length()) { // No negative info. negativePrefix = null; negativeSuffix = null; } else { if (pattern.charAt(index) != syms.getPatternSeparator()) throw new IllegalArgumentException("separator character " + "expected - index: " + index); index = scanFix(pattern, index + 1, buf, patChars, syms, false); negativePrefix = buf.toString(); // We parse the negative format for errors but we don't let // it side-effect this object. index = scanFormat(pattern, index, patChars, syms, false); index = scanFix(pattern, index, buf, patChars, syms, true); negativeSuffix = buf.toString(); if (index != pattern.length()) throw new IllegalArgumentException("end of pattern expected " + "- index: " + index); } }
15,078
private final void applyPatternWithSymbols(String pattern, DecimalFormatSymbols syms) { // Initialize to the state the parser expects. negativePrefix = ""; negativeSuffix = ""; positivePrefix = ""; positiveSuffix = ""; decimalSeparatorAlwaysShown = false; groupingSize = 0; minExponentDigits = 0; multiplier = 1; useExponentialNotation = false; groupingUsed = false; maximumFractionDigits = 0; maximumIntegerDigits = 309; minimumFractionDigits = 0; minimumIntegerDigits = 1; StringBuffer buf = new StringBuffer(); String patChars = patternChars(syms); int max = pattern.length(); int index = scanFix(pattern, 0, buf, patChars, syms, false); positivePrefix = buf.toString(); index = scanFormat(pattern, index, patChars, syms, true); index = scanFix(pattern, index, buf, patChars, syms, true); positiveSuffix = buf.toString(); if (index == pattern.length()) { // No negative info. negativePrefix = null; negativeSuffix = null; } else { if (pattern.charAt(index) != syms.getPatternSeparator()) throw new IllegalArgumentException("separator character " + "expected - index: " + index); index = scanFix(pattern, index + 1, buf, patChars, syms, false); negativePrefix = buf.toString(); // We parse the negative format for errors but we don't let // it side-effect this object. index = scanFormat(pattern, index, patChars, syms, false); index = scanFix(pattern, index, buf, patChars, syms, true); negativeSuffix = buf.toString(); if (index != pattern.length()) throw new IllegalArgumentException("end of pattern expected " + "- index: " + index); } }
private final void applyPatternWithSymbols(String pattern, DecimalFormatSymbols syms) { // Initialize to the state the parser expects. negativePrefix = ""; negativeSuffix = ""; positivePrefix = ""; positiveSuffix = ""; decimalSeparatorAlwaysShown = false; groupingSize = 0; minExponentDigits = 0; multiplier = 1; useExponentialNotation = false; groupingUsed = false; maximumFractionDigits = 0; maximumIntegerDigits = 309; minimumFractionDigits = 0; minimumIntegerDigits = 1; StringBuffer buf = new StringBuffer(); String patChars = patternChars(syms); int max = pattern.length(); int index = scanFix(pattern, 0, buf, patChars, syms, false); positivePrefix = buf.toString(); index = scanFormat(pattern, index, patChars, syms, true); index = scanFix(pattern, index, buf, patChars, syms, true); positiveSuffix = buf.toString(); if (index == pattern.length()) { // No negative info. negativePrefix = null; negativeSuffix = null; } else { if (pattern.charAt(index) != syms.getPatternSeparator()) throw new IllegalArgumentException("separator character " + "expected - index: " + index); index = scanFix(pattern, index + 1, buf, patChars, syms, false); negativePrefix = buf.toString(); // We parse the negative format for errors but we don't let // it side-effect this object. index = scanFormat(pattern, index, patChars, syms, false); index = scanFix(pattern, index, buf, patChars, syms, true); negativeSuffix = buf.toString(); if (index != pattern.length()) throw new IllegalArgumentException("end of pattern expected " + "- index: " + index); } }
15,079
public Object clone() { DecimalFormat c = (DecimalFormat) super.clone(); c.symbols = (DecimalFormatSymbols) symbols.clone(); return c; }
public Object clone() { DecimalFormat c = (DecimalFormat) super.clone(); c.symbols = (DecimalFormatSymbols) symbols.clone(); return c; }
15,080
private final String computePattern(DecimalFormatSymbols syms) { StringBuffer mainPattern = new StringBuffer(); // We have to at least emit a zero for the minimum number of // digits. Past that we need hash marks up to the grouping // separator (and one beyond). int total_digits = Math.max(minimumIntegerDigits, groupingUsed ? groupingSize + 1 : 0); for (int i = 0; i < total_digits - minimumIntegerDigits; ++i) mainPattern.append(syms.getDigit()); for (int i = total_digits - minimumIntegerDigits; i < total_digits; ++i) mainPattern.append(syms.getZeroDigit()); // Inserting the gropuing operator afterwards is easier. if (groupingUsed) mainPattern.insert(mainPattern.length() - groupingSize, syms.getGroupingSeparator()); // See if we need decimal info. if (minimumFractionDigits > 0 || maximumFractionDigits > 0 || decimalSeparatorAlwaysShown) mainPattern.append(syms.getDecimalSeparator()); for (int i = 0; i < minimumFractionDigits; ++i) mainPattern.append(syms.getZeroDigit()); for (int i = minimumFractionDigits; i < maximumFractionDigits; ++i) mainPattern.append(syms.getDigit()); if (useExponentialNotation) { mainPattern.append(syms.getExponential()); for (int i = 0; i < minExponentDigits; ++i) mainPattern.append(syms.getZeroDigit()); if (minExponentDigits == 0) mainPattern.append(syms.getDigit()); } String main = mainPattern.toString(); String patChars = patternChars(syms); mainPattern.setLength(0); quoteFix(mainPattern, positivePrefix, patChars); mainPattern.append(main); quoteFix(mainPattern, positiveSuffix, patChars); if (negativePrefix != null) { quoteFix(mainPattern, negativePrefix, patChars); mainPattern.append(main); quoteFix(mainPattern, negativeSuffix, patChars); } return mainPattern.toString(); }
private final String computePattern(DecimalFormatSymbols syms) { StringBuffer mainPattern = new StringBuffer(); // We have to at least emit a zero for the minimum number of // digits. Past that we need hash marks up to the grouping // separator (and one beyond). int total_digits = Math.max(minimumIntegerDigits, groupingUsed ? groupingSize + 1 : 0); for (int i = 0; i < total_digits - minimumIntegerDigits; ++i) mainPattern.append(syms.getDigit()); for (int i = total_digits - minimumIntegerDigits; i < total_digits; ++i) mainPattern.append(syms.getZeroDigit()); // Inserting the gropuing operator afterwards is easier. if (groupingUsed) mainPattern.insert(mainPattern.length() - groupingSize, syms.getGroupingSeparator()); // See if we need decimal info. if (minimumFractionDigits > 0 || maximumFractionDigits > 0 || decimalSeparatorAlwaysShown) mainPattern.append(syms.getDecimalSeparator()); for (int i = 0; i < minimumFractionDigits; ++i) mainPattern.append(syms.getZeroDigit()); for (int i = minimumFractionDigits; i < maximumFractionDigits; ++i) mainPattern.append(syms.getDigit()); if (useExponentialNotation) { mainPattern.append(syms.getExponential()); for (int i = 0; i < minExponentDigits; ++i) mainPattern.append(syms.getZeroDigit()); if (minExponentDigits == 0) mainPattern.append(syms.getDigit()); } String main = mainPattern.toString(); String patChars = patternChars(syms); mainPattern.setLength(0); quoteFix(mainPattern, positivePrefix, patChars); mainPattern.append(main); quoteFix(mainPattern, positiveSuffix, patChars); if (negativePrefix != null) { quoteFix(mainPattern, negativePrefix, patChars); mainPattern.append(main); quoteFix(mainPattern, negativeSuffix, patChars); } return mainPattern.toString(); }
15,081
private final String computePattern(DecimalFormatSymbols syms) { StringBuffer mainPattern = new StringBuffer(); // We have to at least emit a zero for the minimum number of // digits. Past that we need hash marks up to the grouping // separator (and one beyond). int total_digits = Math.max(minimumIntegerDigits, groupingUsed ? groupingSize + 1 : 0); for (int i = 0; i < total_digits - minimumIntegerDigits; ++i) mainPattern.append(syms.getDigit()); for (int i = total_digits - minimumIntegerDigits; i < total_digits; ++i) mainPattern.append(syms.getZeroDigit()); // Inserting the gropuing operator afterwards is easier. if (groupingUsed) mainPattern.insert(mainPattern.length() - groupingSize, syms.getGroupingSeparator()); // See if we need decimal info. if (minimumFractionDigits > 0 || maximumFractionDigits > 0 || decimalSeparatorAlwaysShown) mainPattern.append(syms.getDecimalSeparator()); for (int i = 0; i < minimumFractionDigits; ++i) mainPattern.append(syms.getZeroDigit()); for (int i = minimumFractionDigits; i < maximumFractionDigits; ++i) mainPattern.append(syms.getDigit()); if (useExponentialNotation) { mainPattern.append(syms.getExponential()); for (int i = 0; i < minExponentDigits; ++i) mainPattern.append(syms.getZeroDigit()); if (minExponentDigits == 0) mainPattern.append(syms.getDigit()); } String main = mainPattern.toString(); String patChars = patternChars(syms); mainPattern.setLength(0); quoteFix(mainPattern, positivePrefix, patChars); mainPattern.append(main); quoteFix(mainPattern, positiveSuffix, patChars); if (negativePrefix != null) { quoteFix(mainPattern, negativePrefix, patChars); mainPattern.append(main); quoteFix(mainPattern, negativeSuffix, patChars); } return mainPattern.toString(); }
private final String computePattern(DecimalFormatSymbols syms) { StringBuffer mainPattern = new StringBuffer(); // We have to at least emit a zero for the minimum number of // digits. Past that we need hash marks up to the grouping // separator (and one beyond). int total_digits = Math.max(minimumIntegerDigits, groupingUsed ? groupingSize + 1 : 0); for (int i = 0; i < total_digits - minimumIntegerDigits; ++i) mainPattern.append(syms.getDigit()); for (int i = total_digits - minimumIntegerDigits; i < total_digits; ++i) mainPattern.append(syms.getZeroDigit()); // Inserting the gropuing operator afterwards is easier. if (groupingUsed) mainPattern.insert(mainPattern.length() - groupingSize, syms.getGroupingSeparator()); // See if we need decimal info. if (minimumFractionDigits > 0 || maximumFractionDigits > 0 || decimalSeparatorAlwaysShown) mainPattern.append(syms.getDecimalSeparator()); for (int i = 0; i < minimumFractionDigits; ++i) mainPattern.append(syms.getZeroDigit()); for (int i = minimumFractionDigits; i < maximumFractionDigits; ++i) mainPattern.append(syms.getDigit()); if (useExponentialNotation) { mainPattern.append(syms.getExponential()); for (int i = 0; i < minExponentDigits; ++i) mainPattern.append(syms.getZeroDigit()); if (minExponentDigits == 0) mainPattern.append(syms.getDigit()); } String main = mainPattern.toString(); String patChars = patternChars(syms); mainPattern.setLength(0); quoteFix(mainPattern, positivePrefix, patChars); mainPattern.append(main); quoteFix(mainPattern, positiveSuffix, patChars); if (negativePrefix != null) { quoteFix(mainPattern, negativePrefix, patChars); mainPattern.append(main); quoteFix(mainPattern, negativeSuffix, patChars); } return mainPattern.toString(); }
15,082
private final String computePattern(DecimalFormatSymbols syms) { StringBuffer mainPattern = new StringBuffer(); // We have to at least emit a zero for the minimum number of // digits. Past that we need hash marks up to the grouping // separator (and one beyond). int total_digits = Math.max(minimumIntegerDigits, groupingUsed ? groupingSize + 1 : 0); for (int i = 0; i < total_digits - minimumIntegerDigits; ++i) mainPattern.append(syms.getDigit()); for (int i = total_digits - minimumIntegerDigits; i < total_digits; ++i) mainPattern.append(syms.getZeroDigit()); // Inserting the gropuing operator afterwards is easier. if (groupingUsed) mainPattern.insert(mainPattern.length() - groupingSize, syms.getGroupingSeparator()); // See if we need decimal info. if (minimumFractionDigits > 0 || maximumFractionDigits > 0 || decimalSeparatorAlwaysShown) mainPattern.append(syms.getDecimalSeparator()); for (int i = 0; i < minimumFractionDigits; ++i) mainPattern.append(syms.getZeroDigit()); for (int i = minimumFractionDigits; i < maximumFractionDigits; ++i) mainPattern.append(syms.getDigit()); if (useExponentialNotation) { mainPattern.append(syms.getExponential()); for (int i = 0; i < minExponentDigits; ++i) mainPattern.append(syms.getZeroDigit()); if (minExponentDigits == 0) mainPattern.append(syms.getDigit()); } String main = mainPattern.toString(); String patChars = patternChars(syms); mainPattern.setLength(0); quoteFix(mainPattern, positivePrefix, patChars); mainPattern.append(main); quoteFix(mainPattern, positiveSuffix, patChars); if (negativePrefix != null) { quoteFix(mainPattern, negativePrefix, patChars); mainPattern.append(main); quoteFix(mainPattern, negativeSuffix, patChars); } return mainPattern.toString(); }
private final String computePattern(DecimalFormatSymbols syms) { StringBuffer mainPattern = new StringBuffer(); // We have to at least emit a zero for the minimum number of // digits. Past that we need hash marks up to the grouping // separator (and one beyond). int total_digits = Math.max(minimumIntegerDigits, groupingUsed ? groupingSize + 1 : 0); for (int i = 0; i < total_digits - minimumIntegerDigits; ++i) mainPattern.append(syms.getDigit()); for (int i = total_digits - minimumIntegerDigits; i < total_digits; ++i) mainPattern.append(syms.getZeroDigit()); // Inserting the gropuing operator afterwards is easier. if (groupingUsed) mainPattern.insert(mainPattern.length() - groupingSize, syms.getGroupingSeparator()); // See if we need decimal info. if (minimumFractionDigits > 0 || maximumFractionDigits > 0 || decimalSeparatorAlwaysShown) mainPattern.append(syms.getDecimalSeparator()); for (int i = 0; i < minimumFractionDigits; ++i) mainPattern.append(syms.getZeroDigit()); for (int i = minimumFractionDigits; i < maximumFractionDigits; ++i) mainPattern.append(syms.getDigit()); if (useExponentialNotation) { mainPattern.append(syms.getExponential()); for (int i = 0; i < minExponentDigits; ++i) mainPattern.append(syms.getZeroDigit()); if (minExponentDigits == 0) mainPattern.append(syms.getDigit()); } String main = mainPattern.toString(); String patChars = patternChars(syms); mainPattern.setLength(0); quoteFix(mainPattern, positivePrefix, patChars); mainPattern.append(main); quoteFix(mainPattern, positiveSuffix, patChars); if (negativePrefix != null) { quoteFix(mainPattern, negativePrefix, patChars); mainPattern.append(main); quoteFix(mainPattern, negativeSuffix, patChars); } return mainPattern.toString(); }
15,083
private final String computePattern(DecimalFormatSymbols syms) { StringBuffer mainPattern = new StringBuffer(); // We have to at least emit a zero for the minimum number of // digits. Past that we need hash marks up to the grouping // separator (and one beyond). int total_digits = Math.max(minimumIntegerDigits, groupingUsed ? groupingSize + 1 : 0); for (int i = 0; i < total_digits - minimumIntegerDigits; ++i) mainPattern.append(syms.getDigit()); for (int i = total_digits - minimumIntegerDigits; i < total_digits; ++i) mainPattern.append(syms.getZeroDigit()); // Inserting the gropuing operator afterwards is easier. if (groupingUsed) mainPattern.insert(mainPattern.length() - groupingSize, syms.getGroupingSeparator()); // See if we need decimal info. if (minimumFractionDigits > 0 || maximumFractionDigits > 0 || decimalSeparatorAlwaysShown) mainPattern.append(syms.getDecimalSeparator()); for (int i = 0; i < minimumFractionDigits; ++i) mainPattern.append(syms.getZeroDigit()); for (int i = minimumFractionDigits; i < maximumFractionDigits; ++i) mainPattern.append(syms.getDigit()); if (useExponentialNotation) { mainPattern.append(syms.getExponential()); for (int i = 0; i < minExponentDigits; ++i) mainPattern.append(syms.getZeroDigit()); if (minExponentDigits == 0) mainPattern.append(syms.getDigit()); } String main = mainPattern.toString(); String patChars = patternChars(syms); mainPattern.setLength(0); quoteFix(mainPattern, positivePrefix, patChars); mainPattern.append(main); quoteFix(mainPattern, positiveSuffix, patChars); if (negativePrefix != null) { quoteFix(mainPattern, negativePrefix, patChars); mainPattern.append(main); quoteFix(mainPattern, negativeSuffix, patChars); } return mainPattern.toString(); }
private final String computePattern(DecimalFormatSymbols syms) { StringBuffer mainPattern = new StringBuffer(); // We have to at least emit a zero for the minimum number of // digits. Past that we need hash marks up to the grouping // separator (and one beyond). int total_digits = Math.max(minimumIntegerDigits, groupingUsed ? groupingSize + 1 : 0); for (int i = 0; i < total_digits - minimumIntegerDigits; ++i) mainPattern.append(syms.getDigit()); for (int i = total_digits - minimumIntegerDigits; i < total_digits; ++i) mainPattern.append(syms.getZeroDigit()); // Inserting the gropuing operator afterwards is easier. if (groupingUsed) mainPattern.insert(mainPattern.length() - groupingSize, syms.getGroupingSeparator()); // See if we need decimal info. if (minimumFractionDigits > 0 || maximumFractionDigits > 0 || decimalSeparatorAlwaysShown) mainPattern.append(syms.getDecimalSeparator()); for (int i = 0; i < minimumFractionDigits; ++i) mainPattern.append(syms.getZeroDigit()); for (int i = minimumFractionDigits; i < maximumFractionDigits; ++i) mainPattern.append(syms.getDigit()); if (useExponentialNotation) { mainPattern.append(syms.getExponential()); for (int i = 0; i < minExponentDigits; ++i) mainPattern.append(syms.getZeroDigit()); if (minExponentDigits == 0) mainPattern.append(syms.getDigit()); } String main = mainPattern.toString(); String patChars = patternChars(syms); mainPattern.setLength(0); quoteFix(mainPattern, positivePrefix, patChars); mainPattern.append(main); quoteFix(mainPattern, positiveSuffix, patChars); if (negativePrefix != null) { quoteFix(mainPattern, negativePrefix, patChars); mainPattern.append(main); quoteFix(mainPattern, negativeSuffix, patChars); } return mainPattern.toString(); }
15,084
private final String computePattern(DecimalFormatSymbols syms) { StringBuffer mainPattern = new StringBuffer(); // We have to at least emit a zero for the minimum number of // digits. Past that we need hash marks up to the grouping // separator (and one beyond). int total_digits = Math.max(minimumIntegerDigits, groupingUsed ? groupingSize + 1 : 0); for (int i = 0; i < total_digits - minimumIntegerDigits; ++i) mainPattern.append(syms.getDigit()); for (int i = total_digits - minimumIntegerDigits; i < total_digits; ++i) mainPattern.append(syms.getZeroDigit()); // Inserting the gropuing operator afterwards is easier. if (groupingUsed) mainPattern.insert(mainPattern.length() - groupingSize, syms.getGroupingSeparator()); // See if we need decimal info. if (minimumFractionDigits > 0 || maximumFractionDigits > 0 || decimalSeparatorAlwaysShown) mainPattern.append(syms.getDecimalSeparator()); for (int i = 0; i < minimumFractionDigits; ++i) mainPattern.append(syms.getZeroDigit()); for (int i = minimumFractionDigits; i < maximumFractionDigits; ++i) mainPattern.append(syms.getDigit()); if (useExponentialNotation) { mainPattern.append(syms.getExponential()); for (int i = 0; i < minExponentDigits; ++i) mainPattern.append(syms.getZeroDigit()); if (minExponentDigits == 0) mainPattern.append(syms.getDigit()); } String main = mainPattern.toString(); String patChars = patternChars(syms); mainPattern.setLength(0); quoteFix(mainPattern, positivePrefix, patChars); mainPattern.append(main); quoteFix(mainPattern, positiveSuffix, patChars); if (negativePrefix != null) { quoteFix(mainPattern, negativePrefix, patChars); mainPattern.append(main); quoteFix(mainPattern, negativeSuffix, patChars); } return mainPattern.toString(); }
private final String computePattern(DecimalFormatSymbols syms) { StringBuffer mainPattern = new StringBuffer(); // We have to at least emit a zero for the minimum number of // digits. Past that we need hash marks up to the grouping // separator (and one beyond). int total_digits = Math.max(minimumIntegerDigits, groupingUsed ? groupingSize + 1 : 0); for (int i = 0; i < total_digits - minimumIntegerDigits; ++i) mainPattern.append(syms.getDigit()); for (int i = total_digits - minimumIntegerDigits; i < total_digits; ++i) mainPattern.append(syms.getZeroDigit()); // Inserting the gropuing operator afterwards is easier. if (groupingUsed) mainPattern.insert(mainPattern.length() - groupingSize, syms.getGroupingSeparator()); // See if we need decimal info. if (minimumFractionDigits > 0 || maximumFractionDigits > 0 || decimalSeparatorAlwaysShown) mainPattern.append(syms.getDecimalSeparator()); for (int i = 0; i < minimumFractionDigits; ++i) mainPattern.append(syms.getZeroDigit()); for (int i = minimumFractionDigits; i < maximumFractionDigits; ++i) mainPattern.append(syms.getDigit()); if (useExponentialNotation) { mainPattern.append(syms.getExponential()); for (int i = 0; i < minExponentDigits; ++i) mainPattern.append(syms.getZeroDigit()); if (minExponentDigits == 0) mainPattern.append(syms.getDigit()); } String main = mainPattern.toString(); String patChars = patternChars(syms); mainPattern.setLength(0); quoteFix(mainPattern, positivePrefix, patChars); mainPattern.append(main); quoteFix(mainPattern, positiveSuffix, patChars); if (negativePrefix != null) { quoteFix(mainPattern, negativePrefix, patChars); mainPattern.append(main); quoteFix(mainPattern, negativeSuffix, patChars); } return mainPattern.toString(); }
15,085
private final String computePattern(DecimalFormatSymbols syms) { StringBuffer mainPattern = new StringBuffer(); // We have to at least emit a zero for the minimum number of // digits. Past that we need hash marks up to the grouping // separator (and one beyond). int total_digits = Math.max(minimumIntegerDigits, groupingUsed ? groupingSize + 1 : 0); for (int i = 0; i < total_digits - minimumIntegerDigits; ++i) mainPattern.append(syms.getDigit()); for (int i = total_digits - minimumIntegerDigits; i < total_digits; ++i) mainPattern.append(syms.getZeroDigit()); // Inserting the gropuing operator afterwards is easier. if (groupingUsed) mainPattern.insert(mainPattern.length() - groupingSize, syms.getGroupingSeparator()); // See if we need decimal info. if (minimumFractionDigits > 0 || maximumFractionDigits > 0 || decimalSeparatorAlwaysShown) mainPattern.append(syms.getDecimalSeparator()); for (int i = 0; i < minimumFractionDigits; ++i) mainPattern.append(syms.getZeroDigit()); for (int i = minimumFractionDigits; i < maximumFractionDigits; ++i) mainPattern.append(syms.getDigit()); if (useExponentialNotation) { mainPattern.append(syms.getExponential()); for (int i = 0; i < minExponentDigits; ++i) mainPattern.append(syms.getZeroDigit()); if (minExponentDigits == 0) mainPattern.append(syms.getDigit()); } String main = mainPattern.toString(); String patChars = patternChars(syms); mainPattern.setLength(0); quoteFix(mainPattern, positivePrefix, patChars); mainPattern.append(main); quoteFix(mainPattern, positiveSuffix, patChars); if (negativePrefix != null) { quoteFix(mainPattern, negativePrefix, patChars); mainPattern.append(main); quoteFix(mainPattern, negativeSuffix, patChars); } return mainPattern.toString(); }
private final String computePattern(DecimalFormatSymbols syms) { StringBuffer mainPattern = new StringBuffer(); // We have to at least emit a zero for the minimum number of // digits. Past that we need hash marks up to the grouping // separator (and one beyond). int total_digits = Math.max(minimumIntegerDigits, groupingUsed ? groupingSize + 1 : 0); for (int i = 0; i < total_digits - minimumIntegerDigits; ++i) mainPattern.append(syms.getDigit()); for (int i = total_digits - minimumIntegerDigits; i < total_digits; ++i) mainPattern.append(syms.getZeroDigit()); // Inserting the gropuing operator afterwards is easier. if (groupingUsed) mainPattern.insert(mainPattern.length() - groupingSize, syms.getGroupingSeparator()); // See if we need decimal info. if (minimumFractionDigits > 0 || maximumFractionDigits > 0 || decimalSeparatorAlwaysShown) mainPattern.append(syms.getDecimalSeparator()); for (int i = 0; i < minimumFractionDigits; ++i) mainPattern.append(syms.getZeroDigit()); for (int i = minimumFractionDigits; i < maximumFractionDigits; ++i) mainPattern.append(syms.getDigit()); if (useExponentialNotation) { mainPattern.append(syms.getExponential()); for (int i = 0; i < minExponentDigits; ++i) mainPattern.append(syms.getZeroDigit()); if (minExponentDigits == 0) mainPattern.append(syms.getDigit()); } String main = mainPattern.toString(); String patChars = patternChars(syms); mainPattern.setLength(0); quoteFix(mainPattern, positivePrefix, patChars); mainPattern.append(main); quoteFix(mainPattern, positiveSuffix, patChars); if (negativePrefix != null) { quoteFix(mainPattern, negativePrefix, patChars); mainPattern.append(main); quoteFix(mainPattern, negativeSuffix, patChars); } return mainPattern.toString(); }
15,086
private final String computePattern(DecimalFormatSymbols syms) { StringBuffer mainPattern = new StringBuffer(); // We have to at least emit a zero for the minimum number of // digits. Past that we need hash marks up to the grouping // separator (and one beyond). int total_digits = Math.max(minimumIntegerDigits, groupingUsed ? groupingSize + 1 : 0); for (int i = 0; i < total_digits - minimumIntegerDigits; ++i) mainPattern.append(syms.getDigit()); for (int i = total_digits - minimumIntegerDigits; i < total_digits; ++i) mainPattern.append(syms.getZeroDigit()); // Inserting the gropuing operator afterwards is easier. if (groupingUsed) mainPattern.insert(mainPattern.length() - groupingSize, syms.getGroupingSeparator()); // See if we need decimal info. if (minimumFractionDigits > 0 || maximumFractionDigits > 0 || decimalSeparatorAlwaysShown) mainPattern.append(syms.getDecimalSeparator()); for (int i = 0; i < minimumFractionDigits; ++i) mainPattern.append(syms.getZeroDigit()); for (int i = minimumFractionDigits; i < maximumFractionDigits; ++i) mainPattern.append(syms.getDigit()); if (useExponentialNotation) { mainPattern.append(syms.getExponential()); for (int i = 0; i < minExponentDigits; ++i) mainPattern.append(syms.getZeroDigit()); if (minExponentDigits == 0) mainPattern.append(syms.getDigit()); } String main = mainPattern.toString(); String patChars = patternChars(syms); mainPattern.setLength(0); quoteFix(mainPattern, positivePrefix, patChars); mainPattern.append(main); quoteFix(mainPattern, positiveSuffix, patChars); if (negativePrefix != null) { quoteFix(mainPattern, negativePrefix, patChars); mainPattern.append(main); quoteFix(mainPattern, negativeSuffix, patChars); } return mainPattern.toString(); }
private final String computePattern(DecimalFormatSymbols syms) { StringBuffer mainPattern = new StringBuffer(); // We have to at least emit a zero for the minimum number of // digits. Past that we need hash marks up to the grouping // separator (and one beyond). int total_digits = Math.max(minimumIntegerDigits, groupingUsed ? groupingSize + 1 : 0); for (int i = 0; i < total_digits - minimumIntegerDigits; ++i) mainPattern.append(syms.getDigit()); for (int i = total_digits - minimumIntegerDigits; i < total_digits; ++i) mainPattern.append(syms.getZeroDigit()); // Inserting the gropuing operator afterwards is easier. if (groupingUsed) mainPattern.insert(mainPattern.length() - groupingSize, syms.getGroupingSeparator()); // See if we need decimal info. if (minimumFractionDigits > 0 || maximumFractionDigits > 0 || decimalSeparatorAlwaysShown) mainPattern.append(syms.getDecimalSeparator()); for (int i = 0; i < minimumFractionDigits; ++i) mainPattern.append(syms.getZeroDigit()); for (int i = minimumFractionDigits; i < maximumFractionDigits; ++i) mainPattern.append(syms.getDigit()); if (useExponentialNotation) { mainPattern.append(syms.getExponential()); for (int i = 0; i < minExponentDigits; ++i) mainPattern.append(syms.getZeroDigit()); if (minExponentDigits == 0) mainPattern.append(syms.getDigit()); } String main = mainPattern.toString(); String patChars = patternChars(syms); mainPattern.setLength(0); quoteFix(mainPattern, positivePrefix, patChars); mainPattern.append(main); quoteFix(mainPattern, positiveSuffix, patChars); if (negativePrefix != null) { quoteFix(mainPattern, negativePrefix, patChars); mainPattern.append(main); quoteFix(mainPattern, negativeSuffix, patChars); } return mainPattern.toString(); }
15,087
private final String computePattern(DecimalFormatSymbols syms) { StringBuffer mainPattern = new StringBuffer(); // We have to at least emit a zero for the minimum number of // digits. Past that we need hash marks up to the grouping // separator (and one beyond). int total_digits = Math.max(minimumIntegerDigits, groupingUsed ? groupingSize + 1 : 0); for (int i = 0; i < total_digits - minimumIntegerDigits; ++i) mainPattern.append(syms.getDigit()); for (int i = total_digits - minimumIntegerDigits; i < total_digits; ++i) mainPattern.append(syms.getZeroDigit()); // Inserting the gropuing operator afterwards is easier. if (groupingUsed) mainPattern.insert(mainPattern.length() - groupingSize, syms.getGroupingSeparator()); // See if we need decimal info. if (minimumFractionDigits > 0 || maximumFractionDigits > 0 || decimalSeparatorAlwaysShown) mainPattern.append(syms.getDecimalSeparator()); for (int i = 0; i < minimumFractionDigits; ++i) mainPattern.append(syms.getZeroDigit()); for (int i = minimumFractionDigits; i < maximumFractionDigits; ++i) mainPattern.append(syms.getDigit()); if (useExponentialNotation) { mainPattern.append(syms.getExponential()); for (int i = 0; i < minExponentDigits; ++i) mainPattern.append(syms.getZeroDigit()); if (minExponentDigits == 0) mainPattern.append(syms.getDigit()); } String main = mainPattern.toString(); String patChars = patternChars(syms); mainPattern.setLength(0); quoteFix(mainPattern, positivePrefix, patChars); mainPattern.append(main); quoteFix(mainPattern, positiveSuffix, patChars); if (negativePrefix != null) { quoteFix(mainPattern, negativePrefix, patChars); mainPattern.append(main); quoteFix(mainPattern, negativeSuffix, patChars); } return mainPattern.toString(); }
private final String computePattern(DecimalFormatSymbols syms) { StringBuffer mainPattern = new StringBuffer(); // We have to at least emit a zero for the minimum number of // digits. Past that we need hash marks up to the grouping // separator (and one beyond). int total_digits = Math.max(minimumIntegerDigits, groupingUsed ? groupingSize + 1 : 0); for (int i = 0; i < total_digits - minimumIntegerDigits; ++i) mainPattern.append(syms.getDigit()); for (int i = total_digits - minimumIntegerDigits; i < total_digits; ++i) mainPattern.append(syms.getZeroDigit()); // Inserting the gropuing operator afterwards is easier. if (groupingUsed) mainPattern.insert(mainPattern.length() - groupingSize, syms.getGroupingSeparator()); // See if we need decimal info. if (minimumFractionDigits > 0 || maximumFractionDigits > 0 || decimalSeparatorAlwaysShown) mainPattern.append(syms.getDecimalSeparator()); for (int i = 0; i < minimumFractionDigits; ++i) mainPattern.append(syms.getZeroDigit()); for (int i = minimumFractionDigits; i < maximumFractionDigits; ++i) mainPattern.append(syms.getDigit()); if (useExponentialNotation) { mainPattern.append(syms.getExponential()); for (int i = 0; i < minExponentDigits; ++i) mainPattern.append(syms.getZeroDigit()); if (minExponentDigits == 0) mainPattern.append(syms.getDigit()); } String main = mainPattern.toString(); String patChars = patternChars(syms); mainPattern.setLength(0); quoteFix(mainPattern, positivePrefix, patChars); mainPattern.append(main); quoteFix(mainPattern, positiveSuffix, patChars); if (negativePrefix != null) { quoteFix(mainPattern, negativePrefix, patChars); mainPattern.append(main); quoteFix(mainPattern, negativeSuffix, patChars); } return mainPattern.toString(); }
15,088
private final String computePattern(DecimalFormatSymbols syms) { StringBuffer mainPattern = new StringBuffer(); // We have to at least emit a zero for the minimum number of // digits. Past that we need hash marks up to the grouping // separator (and one beyond). int total_digits = Math.max(minimumIntegerDigits, groupingUsed ? groupingSize + 1 : 0); for (int i = 0; i < total_digits - minimumIntegerDigits; ++i) mainPattern.append(syms.getDigit()); for (int i = total_digits - minimumIntegerDigits; i < total_digits; ++i) mainPattern.append(syms.getZeroDigit()); // Inserting the gropuing operator afterwards is easier. if (groupingUsed) mainPattern.insert(mainPattern.length() - groupingSize, syms.getGroupingSeparator()); // See if we need decimal info. if (minimumFractionDigits > 0 || maximumFractionDigits > 0 || decimalSeparatorAlwaysShown) mainPattern.append(syms.getDecimalSeparator()); for (int i = 0; i < minimumFractionDigits; ++i) mainPattern.append(syms.getZeroDigit()); for (int i = minimumFractionDigits; i < maximumFractionDigits; ++i) mainPattern.append(syms.getDigit()); if (useExponentialNotation) { mainPattern.append(syms.getExponential()); for (int i = 0; i < minExponentDigits; ++i) mainPattern.append(syms.getZeroDigit()); if (minExponentDigits == 0) mainPattern.append(syms.getDigit()); } String main = mainPattern.toString(); String patChars = patternChars(syms); mainPattern.setLength(0); quoteFix(mainPattern, positivePrefix, patChars); mainPattern.append(main); quoteFix(mainPattern, positiveSuffix, patChars); if (negativePrefix != null) { quoteFix(mainPattern, negativePrefix, patChars); mainPattern.append(main); quoteFix(mainPattern, negativeSuffix, patChars); } return mainPattern.toString(); }
private final String computePattern(DecimalFormatSymbols syms) { StringBuffer mainPattern = new StringBuffer(); // We have to at least emit a zero for the minimum number of // digits. Past that we need hash marks up to the grouping // separator (and one beyond). int total_digits = Math.max(minimumIntegerDigits, groupingUsed ? groupingSize + 1 : 0); for (int i = 0; i < total_digits - minimumIntegerDigits; ++i) mainPattern.append(syms.getDigit()); for (int i = total_digits - minimumIntegerDigits; i < total_digits; ++i) mainPattern.append(syms.getZeroDigit()); // Inserting the gropuing operator afterwards is easier. if (groupingUsed) mainPattern.insert(mainPattern.length() - groupingSize, syms.getGroupingSeparator()); // See if we need decimal info. if (minimumFractionDigits > 0 || maximumFractionDigits > 0 || decimalSeparatorAlwaysShown) mainPattern.append(syms.getDecimalSeparator()); for (int i = 0; i < minimumFractionDigits; ++i) mainPattern.append(syms.getZeroDigit()); for (int i = minimumFractionDigits; i < maximumFractionDigits; ++i) mainPattern.append(syms.getDigit()); if (useExponentialNotation) { mainPattern.append(syms.getExponential()); for (int i = 0; i < minExponentDigits; ++i) mainPattern.append(syms.getZeroDigit()); if (minExponentDigits == 0) mainPattern.append(syms.getDigit()); } String main = mainPattern.toString(); String patChars = patternChars(syms); mainPattern.setLength(0); quoteFix(mainPattern, positivePrefix, patChars); mainPattern.append(main); quoteFix(mainPattern, positiveSuffix, patChars); if (negativePrefix != null) { quoteFix(mainPattern, negativePrefix, patChars); mainPattern.append(main); quoteFix(mainPattern, negativeSuffix, patChars); } return mainPattern.toString(); }
15,089
private final String computePattern(DecimalFormatSymbols syms) { StringBuffer mainPattern = new StringBuffer(); // We have to at least emit a zero for the minimum number of // digits. Past that we need hash marks up to the grouping // separator (and one beyond). int total_digits = Math.max(minimumIntegerDigits, groupingUsed ? groupingSize + 1 : 0); for (int i = 0; i < total_digits - minimumIntegerDigits; ++i) mainPattern.append(syms.getDigit()); for (int i = total_digits - minimumIntegerDigits; i < total_digits; ++i) mainPattern.append(syms.getZeroDigit()); // Inserting the gropuing operator afterwards is easier. if (groupingUsed) mainPattern.insert(mainPattern.length() - groupingSize, syms.getGroupingSeparator()); // See if we need decimal info. if (minimumFractionDigits > 0 || maximumFractionDigits > 0 || decimalSeparatorAlwaysShown) mainPattern.append(syms.getDecimalSeparator()); for (int i = 0; i < minimumFractionDigits; ++i) mainPattern.append(syms.getZeroDigit()); for (int i = minimumFractionDigits; i < maximumFractionDigits; ++i) mainPattern.append(syms.getDigit()); if (useExponentialNotation) { mainPattern.append(syms.getExponential()); for (int i = 0; i < minExponentDigits; ++i) mainPattern.append(syms.getZeroDigit()); if (minExponentDigits == 0) mainPattern.append(syms.getDigit()); } String main = mainPattern.toString(); String patChars = patternChars(syms); mainPattern.setLength(0); quoteFix(mainPattern, positivePrefix, patChars); mainPattern.append(main); quoteFix(mainPattern, positiveSuffix, patChars); if (negativePrefix != null) { quoteFix(mainPattern, negativePrefix, patChars); mainPattern.append(main); quoteFix(mainPattern, negativeSuffix, patChars); } return mainPattern.toString(); }
private final String computePattern(DecimalFormatSymbols syms) { StringBuffer mainPattern = new StringBuffer(); // We have to at least emit a zero for the minimum number of // digits. Past that we need hash marks up to the grouping // separator (and one beyond). int total_digits = Math.max(minimumIntegerDigits, groupingUsed ? groupingSize + 1 : 0); for (int i = 0; i < total_digits - minimumIntegerDigits; ++i) mainPattern.append(syms.getDigit()); for (int i = total_digits - minimumIntegerDigits; i < total_digits; ++i) mainPattern.append(syms.getZeroDigit()); // Inserting the gropuing operator afterwards is easier. if (groupingUsed) mainPattern.insert(mainPattern.length() - groupingSize, syms.getGroupingSeparator()); // See if we need decimal info. if (minimumFractionDigits > 0 || maximumFractionDigits > 0 || decimalSeparatorAlwaysShown) mainPattern.append(syms.getDecimalSeparator()); for (int i = 0; i < minimumFractionDigits; ++i) mainPattern.append(syms.getZeroDigit()); for (int i = minimumFractionDigits; i < maximumFractionDigits; ++i) mainPattern.append(syms.getDigit()); if (useExponentialNotation) { mainPattern.append(syms.getExponential()); for (int i = 0; i < minExponentDigits; ++i) mainPattern.append(syms.getZeroDigit()); if (minExponentDigits == 0) mainPattern.append(syms.getDigit()); } String main = mainPattern.toString(); String patChars = patternChars(syms); mainPattern.setLength(0); quoteFix(mainPattern, positivePrefix, patChars); mainPattern.append(main); quoteFix(mainPattern, positiveSuffix, patChars); if (negativePrefix != null) { quoteFix(mainPattern, negativePrefix, patChars); mainPattern.append(main); quoteFix(mainPattern, negativeSuffix, patChars); } return mainPattern.toString(); }
15,090
private final boolean equals(String s1, String s2) { if (s1 == null || s2 == null) return s1 == s2; return s1.equals(s2); }
private final boolean equals(String s1, String s2) { if (s1 == null || s2 == null) return s1 == s2; return s1.equals(s2); }
15,091
public StringBuffer format(double number, StringBuffer dest, FieldPosition fieldPos) { // A very special case. if (Double.isNaN(number)) { dest.append(symbols.getNaN()); if (fieldPos != null && fieldPos.getField() == INTEGER_FIELD) { int index = dest.length(); fieldPos.setBeginIndex(index - symbols.getNaN().length()); fieldPos.setEndIndex(index); } return dest; } boolean is_neg = number < 0; if (is_neg) { if (negativePrefix != null) dest.append(negativePrefix); else { dest.append(symbols.getMinusSign()); dest.append(positivePrefix); } number = -number; } else dest.append(positivePrefix); int integerBeginIndex = dest.length(); int integerEndIndex = 0; if (Double.isInfinite(number)) { dest.append(symbols.getInfinity()); integerEndIndex = dest.length(); } else { number *= multiplier; // Compute exponent. long exponent = 0; double baseNumber; if (useExponentialNotation) { exponent = (long) Math.floor(Math.log(number) / Math.log(10)); if (minimumIntegerDigits > 0) exponent -= minimumIntegerDigits - 1; baseNumber = (long) (number / Math.pow(10.0, exponent)); } else baseNumber = number; // Round to the correct number of digits. baseNumber += 5 * Math.pow(10.0, -maximumFractionDigits - 1); int index = dest.length(); double intPart = Math.floor(baseNumber); int count = 0; while (count < maximumIntegerDigits && (intPart > 0 || count < minimumIntegerDigits)) { long dig = (long) (intPart % 10); intPart = Math.floor(intPart / 10); // Append group separator if required. if (groupingUsed && count > 0 && count % groupingSize == 0) dest.insert(index, symbols.getGroupingSeparator()); dest.insert(index, (char) (symbols.getZeroDigit() + dig)); ++count; } integerEndIndex = dest.length(); int decimal_index = integerEndIndex; int consecutive_zeros = 0; int total_digits = 0; // Strip integer part from NUMBER. double fracPart = baseNumber - Math.floor(baseNumber); for (count = 0; count < maximumFractionDigits && (fracPart != 0 || count < minimumFractionDigits); ++count) { ++total_digits; fracPart *= 10; long dig = (long) fracPart; if (dig == 0) ++consecutive_zeros; else consecutive_zeros = 0; dest.append((char) (symbols.getZeroDigit() + dig)); // Strip integer part from FRACPART. fracPart = fracPart - Math.floor(fracPart); } // Strip extraneous trailing `0's. We can't always detect // these in the loop. int extra_zeros = Math.min(consecutive_zeros, total_digits - minimumFractionDigits); if (extra_zeros > 0) { dest.setLength(dest.length() - extra_zeros); total_digits -= extra_zeros; } // If required, add the decimal symbol. if (decimalSeparatorAlwaysShown || total_digits > 0) { dest.insert(decimal_index, symbols.getDecimalSeparator()); if (fieldPos != null && fieldPos.getField() == FRACTION_FIELD) { fieldPos.setBeginIndex(decimal_index + 1); fieldPos.setEndIndex(dest.length()); } } // Finally, print the exponent. if (useExponentialNotation) { dest.append(symbols.getExponential()); if (exponent < 0) { dest.append(symbols.getMinusSign()); exponent = -exponent; } index = dest.length(); for (count = 0; exponent > 0 || count < minExponentDigits; ++count) { long dig = exponent % 10; exponent /= 10; dest.insert(index, (char) (symbols.getZeroDigit() + dig)); } } } if (fieldPos != null && fieldPos.getField() == INTEGER_FIELD) { fieldPos.setBeginIndex(integerBeginIndex); fieldPos.setEndIndex(integerEndIndex); } dest.append((is_neg && negativeSuffix != null) ? negativeSuffix : positiveSuffix); return dest; }
public StringBuffer format(double number, StringBuffer dest, FieldPosition fieldPos) { // A very special case. if (Double.isNaN(number)) { dest.append(symbols.getNaN()); if (fieldPos != null && fieldPos.getField() == INTEGER_FIELD) { int index = dest.length(); fieldPos.setBeginIndex(index - symbols.getNaN().length()); fieldPos.setEndIndex(index); } return dest; } boolean is_neg = number < 0; if (is_neg) { if (negativePrefix != null) dest.append(negativePrefix); else { dest.append(symbols.getMinusSign()); dest.append(positivePrefix); } number = -number; } else dest.append(positivePrefix); int integerBeginIndex = dest.length(); int integerEndIndex = 0; if (Double.isInfinite(number)) { dest.append(symbols.getInfinity()); integerEndIndex = dest.length(); } else { number *= multiplier; // Compute exponent. long exponent = 0; double baseNumber; if (useExponentialNotation) { exponent = (long) Math.floor(Math.log(number) / Math.log(10)); if (minimumIntegerDigits > 0) exponent -= minimumIntegerDigits - 1; baseNumber = (long) (number / Math.pow(10.0, exponent)); } else baseNumber = number; // Round to the correct number of digits. baseNumber += 5 * Math.pow(10.0, -maximumFractionDigits - 1); int index = dest.length(); double intPart = Math.floor(baseNumber); int count = 0; while (count < maximumIntegerDigits && (intPart > 0 || count < minimumIntegerDigits)) { long dig = (long) (intPart % 10); intPart = Math.floor(intPart / 10); // Append group separator if required. if (groupingUsed && count > 0 && count % groupingSize == 0) dest.insert(index, symbols.getGroupingSeparator()); dest.insert(index, (char) (symbols.getZeroDigit() + dig)); ++count; } integerEndIndex = dest.length(); int decimal_index = integerEndIndex; int consecutive_zeros = 0; int total_digits = 0; // Strip integer part from NUMBER. double fracPart = baseNumber - Math.floor(baseNumber); for (count = 0; count < maximumFractionDigits && (fracPart != 0 || count < minimumFractionDigits); ++count) { ++total_digits; fracPart *= 10; long dig = (long) fracPart; if (dig == 0) ++consecutive_zeros; else consecutive_zeros = 0; dest.append((char) (symbols.getZeroDigit() + dig)); // Strip integer part from FRACPART. fracPart = fracPart - Math.floor(fracPart); } // Strip extraneous trailing `0's. We can't always detect // these in the loop. int extra_zeros = Math.min(consecutive_zeros, total_digits - minimumFractionDigits); if (extra_zeros > 0) { dest.setLength(dest.length() - extra_zeros); total_digits -= extra_zeros; } // If required, add the decimal symbol. if (decimalSeparatorAlwaysShown || total_digits > 0) { dest.insert(decimal_index, symbols.getDecimalSeparator()); if (fieldPos != null && fieldPos.getField() == FRACTION_FIELD) { fieldPos.setBeginIndex(decimal_index + 1); fieldPos.setEndIndex(dest.length()); } } // Finally, print the exponent. if (useExponentialNotation) { dest.append(symbols.getExponential()); if (exponent < 0) { dest.append(symbols.getMinusSign()); exponent = -exponent; } index = dest.length(); for (count = 0; exponent > 0 || count < minExponentDigits; ++count) { long dig = exponent % 10; exponent /= 10; dest.insert(index, (char) (symbols.getZeroDigit() + dig)); } } } if (fieldPos != null && fieldPos.getField() == INTEGER_FIELD) { fieldPos.setBeginIndex(integerBeginIndex); fieldPos.setEndIndex(integerEndIndex); } dest.append((is_neg && negativeSuffix != null) ? negativeSuffix : positiveSuffix); return dest; }
15,092
public DecimalFormatSymbols getDecimalFormatSymbols() { return symbols; }
public DecimalFormatSymbols getDecimalFormatSymbols() { return symbols; }
15,093
public int getGroupingSize() { return groupingSize; }
public int getGroupingSize() { return groupingSize; }
15,094
public int getMultiplier() { return multiplier; }
public int getMultiplier() { return multiplier; }
15,095
public String getNegativePrefix() { return negativePrefix; }
public String getNegativePrefix() { return negativePrefix; }
15,096
public String getNegativeSuffix() { return negativeSuffix; }
public String getNegativeSuffix() { return negativeSuffix; }
15,097
public String getPositivePrefix() { return positivePrefix; }
public String getPositivePrefix() { return positivePrefix; }
15,098
public String getPositiveSuffix() { return positiveSuffix; }
public String getPositiveSuffix() { return positiveSuffix; }
15,099
public int hashCode() { int hash = (negativeSuffix.hashCode() ^ negativePrefix.hashCode() ^ positivePrefix.hashCode() ^ positiveSuffix.hashCode()); // FIXME. return hash; }
public int hashCode() { int hash = (negativeSuffix.hashCode() ^ negativePrefix.hashCode() ^ positivePrefix.hashCode() ^ positiveSuffix.hashCode()); // FIXME. return hash; }
15,100
public boolean isDecimalSeparatorAlwaysShown() { return decimalSeparatorAlwaysShown; }
public boolean isDecimalSeparatorAlwaysShown() { return decimalSeparatorAlwaysShown; }
15,101
public Number parse(String str, ParsePosition pos) { // Our strategy is simple: copy the text into a buffer, // translating or omitting locale-specific information. Then // let Double or Long convert the number for us. boolean is_neg = false; int index = pos.getIndex(); StringBuffer buf = new StringBuffer(); // We have to check both prefixes, because one might be empty. // We want to pick the longest prefix that matches. boolean got_pos = str.startsWith(positivePrefix, index); String np = (negativePrefix != null ? negativePrefix : positivePrefix + symbols.getMinusSign()); boolean got_neg = str.startsWith(np, index); if (got_pos && got_neg) { // By checking this way, we preserve ambiguity in the case // where the negative format differs only in suffix. We // check this again later. if (np.length() > positivePrefix.length()) { is_neg = true; index += np.length(); } else index += positivePrefix.length(); } else if (got_neg) { is_neg = true; index += np.length(); } else if (got_pos) index += positivePrefix.length(); else { pos.setErrorIndex(index); return null; } // FIXME: handle Inf and NaN. // FIXME: do we have to respect minimum/maxmimum digit stuff? // What about leading zeros? What about multiplier? int start_index = index; int max = str.length(); char zero = symbols.getZeroDigit(); int last_group = -1; boolean int_part = true; boolean exp_part = false; for (; index < max; ++index) { char c = str.charAt(index); // FIXME: what about grouping size? if (groupingUsed && c == symbols.getGroupingSeparator()) { if (last_group != -1 && (index - last_group) % groupingSize != 0) { pos.setErrorIndex(index); return null; } last_group = index; } else if (c >= zero && c <= zero + 9) { buf.append((char) (c - zero + '0')); exp_part = false; } else if (parseIntegerOnly) break; else if (c == symbols.getDecimalSeparator()) { if (last_group != -1 && (index - last_group) % groupingSize != 0) { pos.setErrorIndex(index); return null; } buf.append('.'); int_part = false; } else if (c == symbols.getExponential()) { buf.append('E'); int_part = false; exp_part = true; } else if (exp_part && (c == '+' || c == '-' || c == symbols.getMinusSign())) { // For exponential notation. buf.append(c); } else break; } if (index == start_index) { // Didn't see any digits. pos.setErrorIndex(index); return null; } // Check the suffix. We must do this before converting the // buffer to a number to handle the case of a number which is // the most negative Long. boolean got_pos_suf = str.startsWith(positiveSuffix, index); String ns = (negativePrefix == null ? positiveSuffix : negativeSuffix); boolean got_neg_suf = str.startsWith(ns, index); if (is_neg) { if (!got_neg_suf) { pos.setErrorIndex(index); return null; } } else if (got_pos && got_neg && got_neg_suf) { is_neg = true; } else if (got_pos != got_pos_suf && got_neg != got_neg_suf) { pos.setErrorIndex(index); return null; } String suffix = is_neg ? ns : positiveSuffix; if (is_neg) buf.insert(0, '-'); String t = buf.toString(); Number result = null; try { result = new Long(t); } catch (NumberFormatException x1) { try { result = new Double(t); } catch (NumberFormatException x2) { } } if (result == null) { pos.setErrorIndex(index); return null; } pos.setIndex(index + suffix.length()); return result; }
public Number parse(String str, ParsePosition pos) { // Our strategy is simple: copy the text into a buffer, // translating or omitting locale-specific information. Then // let Double or Long convert the number for us. boolean is_neg = false; int index = pos.getIndex(); StringBuffer buf = new StringBuffer(); // We have to check both prefixes, because one might be empty. // We want to pick the longest prefix that matches. boolean got_pos = str.startsWith(positivePrefix, index); String np = (negativePrefix != null ? negativePrefix : positivePrefix + symbols.getMinusSign()); boolean got_neg = str.startsWith(np, index); if (got_pos && got_neg) { // By checking this way, we preserve ambiguity in the case // where the negative format differs only in suffix. We // check this again later. if (np.length() > positivePrefix.length()) { is_neg = true; index += np.length(); } else index += positivePrefix.length(); } else if (got_neg) { is_neg = true; index += np.length(); } else if (got_pos) index += positivePrefix.length(); else { pos.setErrorIndex(index); return null; } // FIXME: handle Inf and NaN. // FIXME: do we have to respect minimum/maxmimum digit stuff? // What about leading zeros? What about multiplier? int start_index = index; int max = str.length(); char zero = symbols.getZeroDigit(); int last_group = -1; boolean int_part = true; boolean exp_part = false; for (; index < max; ++index) { char c = str.charAt(index); // FIXME: what about grouping size? if (groupingUsed && c == symbols.getGroupingSeparator()) { if (last_group != -1 && (index - last_group) % groupingSize != 0) { pos.setErrorIndex(index); return null; } last_group = index; } else if (c >= zero && c <= zero + 9) { buf.append((char) (c - zero + '0')); exp_part = false; } else if (parseIntegerOnly) break; else if (c == symbols.getDecimalSeparator()) { if (last_group != -1 && (index - last_group) % groupingSize != 0) { pos.setErrorIndex(index); return null; } buf.append('.'); int_part = false; } else if (c == symbols.getExponential()) { buf.append('E'); int_part = false; exp_part = true; } else if (exp_part && (c == '+' || c == '-' || c == symbols.getMinusSign())) { // For exponential notation. buf.append(c); } else break; } if (index == start_index) { // Didn't see any digits. pos.setErrorIndex(index); return null; } // Check the suffix. We must do this before converting the // buffer to a number to handle the case of a number which is // the most negative Long. boolean got_pos_suf = str.startsWith(positiveSuffix, index); String ns = (negativePrefix == null ? positiveSuffix : negativeSuffix); boolean got_neg_suf = str.startsWith(ns, index); if (is_neg) { if (!got_neg_suf) { pos.setErrorIndex(index); return null; } } else if (got_pos && got_neg && got_neg_suf) { is_neg = true; } else if (got_pos != got_pos_suf && got_neg != got_neg_suf) { pos.setErrorIndex(index); return null; } String suffix = is_neg ? ns : positiveSuffix; if (is_neg) buf.insert(0, '-'); String t = buf.toString(); Number result = null; try { result = new Long(t); } catch (NumberFormatException x1) { try { result = new Double(t); } catch (NumberFormatException x2) { } } if (result == null) { pos.setErrorIndex(index); return null; } pos.setIndex(index + suffix.length()); return result; }
15,102