Package ch.qos.logback.core.pattern
Class FormatInfo
java.lang.Object
ch.qos.logback.core.pattern.FormatInfo
FormattingInfo instances contain the information obtained when parsing
formatting modifiers in conversion modifiers.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprivate booleanprivate intprivate int -
Constructor Summary
ConstructorsConstructorDescriptionFormatInfo(int min, int max) FormatInfo(int min, int max, boolean leftPad, boolean leftTruncate) -
Method Summary
Modifier and TypeMethodDescriptionbooleanintgetMax()intgetMin()inthashCode()booleanbooleanvoidsetLeftPad(boolean leftAlign) voidsetLeftTruncate(boolean leftTruncate) voidsetMax(int max) voidsetMin(int min) toString()static FormatInfoThis method is used to parse a string such as "5", ".7", "5.7" or "-5.7" into a FormatInfo.
-
Field Details
-
min
private int min -
max
private int max -
leftPad
private boolean leftPad -
leftTruncate
private boolean leftTruncate
-
-
Constructor Details
-
FormatInfo
public FormatInfo() -
FormatInfo
public FormatInfo(int min, int max) -
FormatInfo
public FormatInfo(int min, int max, boolean leftPad, boolean leftTruncate)
-
-
Method Details
-
valueOf
This method is used to parse a string such as "5", ".7", "5.7" or "-5.7" into a FormatInfo.- Parameters:
str- A String to convert into a FormatInfo object- Returns:
- A newly created and appropriately initialized FormatInfo object.
- Throws:
IllegalArgumentException
-
isLeftPad
public boolean isLeftPad() -
setLeftPad
public void setLeftPad(boolean leftAlign) -
getMax
public int getMax() -
setMax
public void setMax(int max) -
getMin
public int getMin() -
setMin
public void setMin(int min) -
isLeftTruncate
public boolean isLeftTruncate() -
setLeftTruncate
public void setLeftTruncate(boolean leftTruncate) -
equals
-
hashCode
public int hashCode() -
toString
-