Package io.keikai.compat
Class ZssContext
java.lang.Object
io.keikai.compat.ZssContext
Keikai Spreadsheet context for cell evaluation: Locale, two-digit
year window, and circular-iteration limits.
This class previously lived at
org.apache.poi.ss.usermodel.ZssContext as one of the 115
Potix custom modifications to the Apache POI fork. It was relocated
here for Keikai 7.0 so the io.keikai:poi fork dependency can be
dropped — see doc/upgrade-6.3-to-7.0.md.
- Since:
- 7.0.0
- Author:
- henrichen@zkoss.org
-
Constructor Summary
ConstructorsConstructorDescriptionZssContext(Locale locale, int twoDigitYearUpperBound) ZssContext(Locale locale, int twoDigitYearUpperBound, double maxChange, int maxCount) -
Method Summary
Modifier and TypeMethodDescriptionstatic final ZssContextReturns the current Keikai Spreadsheet Context; never null.doubleReturns the maximum changes between two circular evaluation.intReturns the maximum iteration count on circular evaluation.static final ZssContextReturns the Keikai Spreadsheet Context defined bysetThreadLocal(io.keikai.compat.ZssContext).intstatic final ZssContextsetThreadLocal(ZssContext ctx) Sets the locale for the current thread only.
-
Constructor Details
-
ZssContext
-
ZssContext
-
-
Method Details
-
getLocale
-
getTwoDigitYearUpperBound
public int getTwoDigitYearUpperBound() -
getMaxCount
public int getMaxCount()Returns the maximum iteration count on circular evaluation.- Returns:
-
getMaxChange
public double getMaxChange()Returns the maximum changes between two circular evaluation.- Returns:
-
getCurrent
Returns the current Keikai Spreadsheet Context; never null. This is the Keikai Spreadsheet Context that every other objects shall use, unless they have special consideration.Default: If
setThreadLocal(io.keikai.compat.ZssContext)was called with non-null, the value is returned. Otherwise, a default context is created and returned, -
setThreadLocal
Sets the locale for the current thread only.Each thread could have an independent ZssContext, called the thread locale.
When Invoking this method under a thread that serves requests, remember to clean up the setting upon completing each request.
ZssContext old = ZssContext.setThreadLocal(newValue); try { ... } finally { ZssContext.setThreadLocal(old); }- Parameters:
ctx- the thread ZssContext; null to denote no thread zssContext- Returns:
- the previous thread locale
-
getThreadLocal
Returns the Keikai Spreadsheet Context defined bysetThreadLocal(io.keikai.compat.ZssContext).- See Also:
-