Package de.hsh.graja.modules.junit.api
Class NormalizerRuleTrimMaxLeadingSpacePerLine
- java.lang.Object
-
- student.testingsupport.StringNormalizer.NormalizerRule
-
- de.hsh.graja.modules.junit.api.NormalizerRuleTrimMaxLeadingSpacePerLine
-
public class NormalizerRuleTrimMaxLeadingSpacePerLine extends StringNormalizer.NormalizerRule
A string normalizer for string comparisons that should ignore differences that result from different but uniform indentation level.
-
-
Constructor Summary
Constructors Constructor Description NormalizerRuleTrimMaxLeadingSpacePerLine()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
displayName()
Human readable name of the ruleboolean
equals(Object obj)
int
hashCode()
String
normalize(String content)
perform the normalization by removing a maximum number of columns from indentation.
-
-
-
Method Detail
-
normalize
public String normalize(String content)
perform the normalization by removing a maximum number of columns from indentation.- Specified by:
normalize
in classStringNormalizer.NormalizerRule
- Parameters:
content
- The string to normalize- Returns:
- The normalized result
-
displayName
public String displayName()
Description copied from class:StringNormalizer.NormalizerRule
Human readable name of the rule- Specified by:
displayName
in classStringNormalizer.NormalizerRule
- Returns:
- the text "remove uniform indentation"
-
hashCode
public int hashCode()
- Specified by:
hashCode
in classStringNormalizer.NormalizerRule
- Returns:
- a constant hash code since all instances of this class are equal
-
equals
public boolean equals(Object obj)
- Specified by:
equals
in classStringNormalizer.NormalizerRule
- Parameters:
obj
- another object- Returns:
- true, if
obj
andthis
are of typeNormalizerRuleTrimMaxLeadingSpacePerLine
.
-
-