Package ch.qos.logback.core.pattern
Class FormatInfo
- java.lang.Object
-
- ch.qos.logback.core.pattern.FormatInfo
-
public class FormatInfo extends java.lang.ObjectFormattingInfo instances contain the information obtained when parsing formatting modifiers in conversion modifiers.
-
-
Constructor Summary
Constructors Constructor Description FormatInfo()FormatInfo(int min, int max)FormatInfo(int min, int max, boolean leftPad, boolean leftTruncate)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)intgetMax()intgetMin()inthashCode()booleanisLeftPad()booleanisLeftTruncate()voidsetLeftPad(boolean leftAlign)voidsetLeftTruncate(boolean leftTruncate)voidsetMax(int max)voidsetMin(int min)java.lang.StringtoString()static FormatInfovalueOf(java.lang.String str)This method is used to parse a string such as "5", ".7", "5.7" or "-5.7" into a FormatInfo.
-
-
-
Method Detail
-
valueOf
public static FormatInfo valueOf(java.lang.String str) throws java.lang.IllegalArgumentException
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:
java.lang.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
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-