Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (101)
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 (309)
Collections:
Other Resources:
JDK 11 jdk.internal.le.jmod - Internal Line Editing Module
JDK 11 jdk.internal.le.jmod is the JMOD file for JDK 11 Internal Line Editing module.
JDK 11 Internal Line Editing module compiled class files are stored in \fyicenter\jdk-11.0.1\jmods\jdk.internal.le.jmod.
JDK 11 Internal Line Editing module compiled class files are also linked and stored in the \fyicenter\jdk-11.0.1\lib\modules JImage file.
JDK 11 Internal Line Editing module source code files are stored in \fyicenter\jdk-11.0.1\lib\src.zip\jdk.internal.le.
You can click and view the content of each source code file in the list below.
✍: FYIcenter
⏎ jdk/internal/jline/console/KillRing.java
/* * Copyright (c) 2002-2016, the original author or authors. * * This software is distributable under the BSD license. See the terms of the * BSD license in the documentation provided with this software. * * http://www.opensource.org/licenses/bsd-license.php */ package jdk.internal.jline.console; /** * The kill ring class keeps killed text in a fixed size ring. In this * class we also keep record of whether or not the last command was a * kill or a yank. Depending on this, the class may behave * different. For instance, two consecutive kill-word commands fill * the same slot such that the next yank will return the two * previously killed words instead that only the last one. Likewise * yank pop requires that the previous command was either a yank or a * yank-pop. */ public final class KillRing { /** * Default size is 60, like in emacs. */ private static final int DEFAULT_SIZE = 60; private final String[] slots; private int head = 0; private boolean lastKill = false; private boolean lastYank = false; /** * Creates a new kill ring of the given size. */ public KillRing(int size) { slots = new String[size]; } /** * Creates a new kill ring of the default size. See {@link #DEFAULT_SIZE}. */ public KillRing() { this(DEFAULT_SIZE); } /** * Resets the last-yank state. */ public void resetLastYank() { lastYank = false; } /** * Resets the last-kill state. */ public void resetLastKill() { lastKill = false; } /** * Returns {@code true} if the last command was a yank. */ public boolean lastYank() { return lastYank; } /** * Adds the string to the kill-ring. Also sets lastYank to false * and lastKill to true. */ public void add(String str) { lastYank = false; if (lastKill) { if (slots[head] != null) { slots[head] += str; return; } } lastKill = true; next(); slots[head] = str; } /** * Adds the string to the kill-ring product of killing * backwards. If the previous command was a kill text one then * adds the text at the beginning of the previous kill to avoid * that two consecutive backwards kills followed by a yank leaves * things reversed. */ public void addBackwards(String str) { lastYank = false; if (lastKill) { if (slots[head] != null) { slots[head] = str + slots[head]; return; } } lastKill = true; next(); slots[head] = str; } /** * Yanks a previously killed text. Returns {@code null} if the * ring is empty. */ public String yank() { lastKill = false; lastYank = true; return slots[head]; } /** * Moves the pointer to the current slot back and returns the text * in that position. If the previous command was not yank returns * null. */ public String yankPop() { lastKill = false; if (lastYank) { prev(); return slots[head]; } return null; } /** * Moves the pointer to the current slot forward. If the end of * the slots is reached then points back to the beginning. */ private void next() { if (head == 0 && slots[0] == null) { return; } head++; if (head == slots.length) { head = 0; } } /** * Moves the pointer to the current slot backwards. If the * beginning of the slots is reached then traverses the slot * backwards until one with not null content is found. */ private void prev() { head--; if (head == -1) { int x = slots.length - 1; for (; x >= 0; x--) { if (slots[x] != null) { break; } } head = x; } } }
⏎ jdk/internal/jline/console/KillRing.java
Or download all of them as a single archive file:
File name: jdk.internal.le-11.0.1-src.zip File size: 116985 bytes Release date: 2018-11-04 Download
⇒ JDK 11 jdk.internal.opt.jmod - Internal Opt Module
⇐ JDK 11 jdk.internal.jvmstat.jmod - Internal JVM Stat Module
2020-08-02, 23830👍, 0💬
Popular Posts:
iText is an ideal library for developers looking to enhance web- and other applications with dynamic...
JDK 11 jdk.internal.le.jmod is the JMOD file for JDK 11 Internal Line Editing module. JDK 11 Interna...
How to download and install ojdbc7.jar for Oracle 12c R1? ojdbc8.jar for Oracle 12c R1 is a Java 7 a...
How to download and install ojdbc14.jar for Oracle 10g R2? ojdbc14.jar for Oracle 10g R2 is a Java 1...
What Is in Xerces-J-bin.2.12.2.zip? Xerces-J-bin.2.12.2.zip file is the distribution package ZIP fil...