Package org.biojava.bio.symbol
Class SoftMaskedAlphabet.MaskingDetector.DefaultMaskingDetector
- java.lang.Object
-
- org.biojava.bio.symbol.SoftMaskedAlphabet.MaskingDetector.DefaultMaskingDetector
-
- All Implemented Interfaces:
SoftMaskedAlphabet.MaskingDetector
- Enclosing interface:
- SoftMaskedAlphabet.MaskingDetector
public static class SoftMaskedAlphabet.MaskingDetector.DefaultMaskingDetector extends Object implements SoftMaskedAlphabet.MaskingDetector
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.biojava.bio.symbol.SoftMaskedAlphabet.MaskingDetector
SoftMaskedAlphabet.MaskingDetector.DefaultMaskingDetector
-
-
Field Summary
-
Fields inherited from interface org.biojava.bio.symbol.SoftMaskedAlphabet.MaskingDetector
DEFAULT
-
-
Constructor Summary
Constructors Constructor Description DefaultMaskingDetector()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isMasked(String token)
Default Behaivour is that if the whole token is lower case it is masked.String
mask(String token)
Masks a token by making it lowercaseString
unmask(String token)
Un-masks the token by making it upper case.
-
-
-
Constructor Detail
-
DefaultMaskingDetector
public DefaultMaskingDetector()
-
-
Method Detail
-
isMasked
public boolean isMasked(String token)
Default Behaivour is that if the whole token is lower case it is masked.- Specified by:
isMasked
in interfaceSoftMaskedAlphabet.MaskingDetector
- Parameters:
token
- theString
to check for masking- Returns:
- true is it is all lower case, otherwise false.
-
mask
public String mask(String token)
Masks a token by making it lowercase- Specified by:
mask
in interfaceSoftMaskedAlphabet.MaskingDetector
- Parameters:
token
- theString
to mask- Returns:
- a lower case
String
-
unmask
public String unmask(String token)
Un-masks the token by making it upper case.- Specified by:
unmask
in interfaceSoftMaskedAlphabet.MaskingDetector
- Parameters:
token
- theString
to unmask- Returns:
- the upper case
String
-
-