Package org.apache.poi.ss.format
Class CellNumberStringMod
java.lang.Object
org.apache.poi.ss.format.CellNumberStringMod
- All Implemented Interfaces:
Comparable<CellNumberStringMod>
@Internal
public class CellNumberStringMod
extends Object
implements Comparable<CellNumberStringMod>
Internal helper class for CellNumberFormatter
This class represents a single modification to a result string. The way
this works is complicated, but so is numeric formatting. In general, for
most formats, we use a DecimalFormat object that will put the string out
in a known format, usually with all possible leading and trailing zeros.
We then walk through the result and the original format, and note any
modifications that need to be made. Finally, we go through and apply
them all, dealing with overlapping modifications.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCellNumberStringMod
(org.apache.poi.ss.format.CellNumberFormatter.Special start, boolean startInclusive, org.apache.poi.ss.format.CellNumberFormatter.Special end, boolean endInclusive) CellNumberStringMod
(org.apache.poi.ss.format.CellNumberFormatter.Special start, boolean startInclusive, org.apache.poi.ss.format.CellNumberFormatter.Special end, boolean endInclusive, char toAdd) CellNumberStringMod
(org.apache.poi.ss.format.CellNumberFormatter.Special special, CharSequence toAdd, int op) -
Method Summary
-
Field Details
-
BEFORE
public static final int BEFORE- See Also:
-
AFTER
public static final int AFTER- See Also:
-
REPLACE
public static final int REPLACE- See Also:
-
-
Constructor Details
-
CellNumberStringMod
public CellNumberStringMod(org.apache.poi.ss.format.CellNumberFormatter.Special special, CharSequence toAdd, int op) -
CellNumberStringMod
public CellNumberStringMod(org.apache.poi.ss.format.CellNumberFormatter.Special start, boolean startInclusive, org.apache.poi.ss.format.CellNumberFormatter.Special end, boolean endInclusive, char toAdd) -
CellNumberStringMod
public CellNumberStringMod(org.apache.poi.ss.format.CellNumberFormatter.Special start, boolean startInclusive, org.apache.poi.ss.format.CellNumberFormatter.Special end, boolean endInclusive)
-
-
Method Details
-
compareTo
- Specified by:
compareTo
in interfaceComparable<CellNumberStringMod>
-
equals
-
hashCode
public int hashCode() -
getSpecial
public org.apache.poi.ss.format.CellNumberFormatter.Special getSpecial() -
getOp
public int getOp() -
getToAdd
-
getEnd
public org.apache.poi.ss.format.CellNumberFormatter.Special getEnd() -
isStartInclusive
public boolean isStartInclusive() -
isEndInclusive
public boolean isEndInclusive()
-