public final class Keep
extends java.lang.Object
| Modifier and Type | Field | Description |
|---|---|---|
static Keep |
KEEP_ALWAYS |
keep always
|
static Keep |
KEEP_AUTO |
keep auto
|
| Modifier and Type | Method | 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() |
|
java.lang.String |
toString() |
public static final Keep KEEP_AUTO
public static final Keep KEEP_ALWAYS
public static Keep getKeep(KeepProperty keepProperty)
KeepPropertykeepProperty - the KeepPropertypublic boolean isAuto()
true if the keep property was specified as "auto"public int getContext()
Constants.EN_LINE, Constants.EN_COLUMN or
Constants.EN_PAGEpublic int getPenalty()
public Keep compare(Keep other)
other - the instance to compare topublic java.lang.String toString()
toString in class java.lang.ObjectCopyright 1999-2016 The Apache Software Foundation. All Rights Reserved.