286N/A/*
286N/A * reserved comment block
286N/A * DO NOT REMOVE OR ALTER!
286N/A */
286N/A/*
286N/A * Copyright 1999-2004 The Apache Software Foundation.
286N/A *
286N/A * Licensed under the Apache License, Version 2.0 (the "License");
286N/A * you may not use this file except in compliance with the License.
286N/A * You may obtain a copy of the License at
286N/A *
286N/A * http://www.apache.org/licenses/LICENSE-2.0
286N/A *
286N/A * Unless required by applicable law or agreed to in writing, software
286N/A * distributed under the License is distributed on an "AS IS" BASIS,
286N/A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
286N/A * See the License for the specific language governing permissions and
286N/A * limitations under the License.
286N/A */
286N/A/*
286N/A * $Id: FuncCeiling.java,v 1.2.4.1 2005/09/14 19:53:44 jeffsuttor Exp $
286N/A */
286N/Apackage com.sun.org.apache.xpath.internal.functions;
286N/A
286N/Aimport com.sun.org.apache.xpath.internal.XPathContext;
286N/Aimport com.sun.org.apache.xpath.internal.objects.XNumber;
286N/Aimport com.sun.org.apache.xpath.internal.objects.XObject;
286N/A
286N/A/**
286N/A * Execute the Ceiling() function.
286N/A * @xsl.usage advanced
286N/A */
286N/Apublic class FuncCeiling extends FunctionOneArg
286N/A{
286N/A static final long serialVersionUID = -1275988936390464739L;
286N/A
286N/A /**
286N/A * Execute the function. The function must return
286N/A * a valid object.
286N/A * @param xctxt The current execution context.
286N/A * @return A valid XObject.
286N/A *
286N/A * @throws javax.xml.transform.TransformerException
286N/A */
286N/A public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException
286N/A {
286N/A return new XNumber(Math.ceil(m_arg0.execute(xctxt).num()));
286N/A }
286N/A}