public class Keep
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static Keep |
KEEP_ALWAYS |
static Keep |
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() |
java.lang.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 topublic java.lang.String toString()
toString
in class java.lang.Object
Copyright 1999-2010 The Apache Software Foundation. All Rights Reserved.