public final class KillRing extends Object
Constructor | Description |
---|---|
KillRing() |
Creates a new kill ring of the default size.
|
KillRing(int size) |
Creates a new kill ring of the given size.
|
Modifier and Type | Method | Description |
---|---|---|
void |
add(String str) |
Adds the string to the kill-ring.
|
void |
addBackwards(String str) |
Adds the string to the kill-ring product of killing
backwards.
|
boolean |
lastYank() |
Returns
true if the last command was a yank. |
void |
resetLastKill() |
Resets the last-kill state.
|
void |
resetLastYank() |
Resets the last-yank state.
|
String |
yank() |
Yanks a previously killed text.
|
String |
yankPop() |
Moves the pointer to the current slot back and returns the text
in that position.
|
public KillRing(int size)
size
- the size of the ringpublic KillRing()
DEFAULT_SIZE
.public void resetLastYank()
public void resetLastKill()
public boolean lastYank()
true
if the last command was a yank.true
if the last command was a yankpublic void add(String str)
str
- the string to addpublic void addBackwards(String str)
str
- the string to addpublic String yank()
null
if the
ring is empty.public String yankPop()
Copyright © 2020. All rights reserved.