Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (102)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (322)
Collections:
Other Resources:
JDK 11 java.desktop.jmod - Desktop Module
JDK 11 java.desktop.jmod is the JMOD file for JDK 11 Desktop module.
JDK 11 Desktop module compiled class files are stored in \fyicenter\jdk-11.0.1\jmods\java.desktop.jmod.
JDK 11 Desktop module compiled class files are also linked and stored in the \fyicenter\jdk-11.0.1\lib\modules JImage file.
JDK 11 Desktop module source code files are stored in \fyicenter\jdk-11.0.1\lib\src.zip\java.desktop.
You can click and view the content of each source code file in the list below.
✍: FYIcenter
⏎ javax/swing/text/WhitespaceBasedBreakIterator.java
/*
* Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package javax.swing.text;
import java.text.BreakIterator;
import java.text.CharacterIterator;
import java.text.StringCharacterIterator;
import java.util.Arrays;
/**
* A simple whitespace-based BreakIterator implementation.
*
* @author Sergey Groznyh
*/
class WhitespaceBasedBreakIterator extends BreakIterator {
private char[] text = new char[0];
private int[] breaks = new int[] { 0 } ;
private int pos = 0;
/**
* Calculate break positions eagerly parallel to reading text.
*/
public void setText(CharacterIterator ci) {
int begin = ci.getBeginIndex();
text = new char[ci.getEndIndex() - begin];
int[] breaks0 = new int[text.length + 1];
int brIx = 0;
breaks0[brIx++] = begin;
int charIx = 0;
boolean inWs = false;
for (char c = ci.first(); c != CharacterIterator.DONE; c = ci.next()) {
text[charIx] = c;
boolean ws = Character.isWhitespace(c);
if (inWs && !ws) {
breaks0[brIx++] = charIx + begin;
}
inWs = ws;
charIx++;
}
if (text.length > 0) {
breaks0[brIx++] = text.length + begin;
}
System.arraycopy(breaks0, 0, breaks = new int[brIx], 0, brIx);
}
public CharacterIterator getText() {
return new StringCharacterIterator(new String(text));
}
public int first() {
return breaks[pos = 0];
}
public int last() {
return breaks[pos = breaks.length - 1];
}
public int current() {
return breaks[pos];
}
public int next() {
return (pos == breaks.length - 1 ? DONE : breaks[++pos]);
}
public int previous() {
return (pos == 0 ? DONE : breaks[--pos]);
}
public int next(int n) {
return checkhit(pos + n);
}
public int following(int n) {
return adjacent(n, 1);
}
public int preceding(int n) {
return adjacent(n, -1);
}
private int checkhit(int hit) {
if ((hit < 0) || (hit >= breaks.length)) {
return DONE;
} else {
return breaks[pos = hit];
}
}
private int adjacent(int n, int bias) {
int hit = Arrays.binarySearch(breaks, n);
int offset = (hit < 0 ? (bias < 0 ? -1 : -2) : 0);
return checkhit(Math.abs(hit) + bias + offset);
}
}
⏎ javax/swing/text/WhitespaceBasedBreakIterator.java
Or download all of them as a single archive file:
File name: java.desktop-11.0.1-src.zip File size: 7974380 bytes Release date: 2018-11-04 Download
⇒ JDK 11 java.instrument.jmod - Instrument Module
2022-08-06, ≈888🔥, 5💬
Popular Posts:
What JAR files are required to run sax\Writer.java provided in the Apache Xerces package? 1 JAR file...
iText is an ideal library for developers looking to enhance web- and other applications with dynamic...
JDK 17 jdk.jpackage.jmod is the JMOD file for JDK 17 JPackage tool, which can be invoked by the "jpa...
xml-commons Resolver Source Code Files are provided in the source package file, xml-commons-resolver...
How to download and install Apache ZooKeeper Source Package? Apache ZooKeeper is an open-source serv...