com.caucho.quercus.lib.gettext.expr
Class PluralExpr

java.lang.Object
  extended by com.caucho.quercus.lib.gettext.expr.PluralExpr

public class PluralExpr
extends java.lang.Object

Represents a gettext plural expression.


Method Summary
static int eval(java.lang.CharSequence expr, int quantity)
          Returns evaluated plural expression
 int eval(int quantity)
          Evaluates this plural expression.
static PluralExpr getPluralExpr(StringValue metaData)
          Returns a PluralExpr from the metadata.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getPluralExpr

public static PluralExpr getPluralExpr(StringValue metaData)
Returns a PluralExpr from the metadata.

Parameters:
metadata - contains the plural expression
Returns:
PluralExpr

eval

public static int eval(java.lang.CharSequence expr,
                       int quantity)
Returns evaluated plural expression

Parameters:
expr -
quantity - number of items

eval

public int eval(int quantity)
Evaluates this plural expression.