Class SimpleMaskingCallback

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.Character mask  
    • Constructor Summary

      Constructors 
      Constructor Description
      SimpleMaskingCallback​(java.lang.Character mask)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String display​(java.lang.String line)
      Transforms the line before it is displayed so that some parts can be hidden.
      java.lang.String history​(java.lang.String line)
      Transforms the line before storing in the history.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • mask

        private final java.lang.Character mask
    • Constructor Detail

      • SimpleMaskingCallback

        public SimpleMaskingCallback​(java.lang.Character mask)
    • Method Detail

      • display

        public java.lang.String display​(java.lang.String line)
        Description copied from interface: MaskingCallback
        Transforms the line before it is displayed so that some parts can be hidden.
        Specified by:
        display in interface MaskingCallback
        Parameters:
        line - the current line being edited
        Returns:
        the modified line to display
      • history

        public java.lang.String history​(java.lang.String line)
        Description copied from interface: MaskingCallback
        Transforms the line before storing in the history. If the return value is empty or null, it will not be saved in the history.
        Specified by:
        history in interface MaskingCallback
        Parameters:
        line - the line to be added to history
        Returns:
        the modified line