Top Description Fields Constructors Methods
jdk.internal.org.jline.reader.impl

public final Class SimpleMaskingCallback

extends Object
implements MaskingCallback
Class Inheritance
All Implemented Interfaces
jdk.internal.org.jline.reader.MaskingCallback
Imports
java.util.Objects, jdk.internal.org.jline.reader.MaskingCallback

Simple MaskingCallback that will replace all the characters in the line with the given mask. If the given mask is equal to LineReaderImpl#NULL_MASK then the line will be replaced with an empty String.

Field Summary

Modifier and TypeField and Description
private final Character

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public String
display(String
the current line being edited
line
)

Implements jdk.internal.org.jline.reader.MaskingCallback.display.

Transforms the line before it is displayed so that some parts can be hidden.

public String
history(String
the line to be added to history
line
)

Implements jdk.internal.org.jline.reader.MaskingCallback.history.

Transforms the line before storing in the history.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

maskback to summary
private final Character mask

Constructor Detail

SimpleMaskingCallbackback to summary
public SimpleMaskingCallback(Character mask)

Method Detail

displayback to summary
public String display(String line)

Implements jdk.internal.org.jline.reader.MaskingCallback.display.

Doc from jdk.internal.org.jline.reader.MaskingCallback.display.

Transforms the line before it is displayed so that some parts can be hidden.

Parameters
line:String

the current line being edited

Returns:String

the modified line to display

Annotations
@Override
historyback to summary
public String history(String line)

Implements jdk.internal.org.jline.reader.MaskingCallback.history.

Doc from jdk.internal.org.jline.reader.MaskingCallback.history.

Transforms the line before storing in the history. If the return value is empty or null, it will not be saved in the history.

Parameters
line:String

the line to be added to history

Returns:String

the modified line

Annotations
@Override