public final class Keep extends Object
Modifier and Type | Field and Description |
---|---|
static Keep |
KEEP_ALWAYS
keep always
|
static Keep |
KEEP_AUTO
keep auto
|
Modifier and Type | Method and Description |
---|---|
Keep |
compare(Keep other)
Compare this Keep instance to another one, and return the
stronger one if the context is the same
|
int |
getContext()
Returns the context of this keep.
|
static Keep |
getKeep(KeepProperty keepProperty)
Obtain a Keep instance corresponding to the given
KeepProperty |
int |
getPenalty() |
boolean |
isAuto() |
String |
toString() |
public static final Keep KEEP_AUTO
public static final Keep KEEP_ALWAYS
public static Keep getKeep(KeepProperty keepProperty)
KeepProperty
keepProperty
- the KeepProperty
public boolean isAuto()
true
if the keep property was specified as "auto"public int getContext()
Constants.EN_LINE
, Constants.EN_COLUMN
or
Constants.EN_PAGE
public int getPenalty()
public Keep compare(Keep other)
other
- the instance to compare toCopyright © 2025 Apache Software Foundation. All rights reserved.