Clover coverage report - Code Coverage for tapestry release 4.0.1
Coverage timestamp: Fri Mar 31 2006 09:12:14 EST
file stats: LOC: 51   Methods: 0
NCLOC: 7   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
DataSqueezer.java - - - -
coverage
 1    // Copyright 2004, 2005 The Apache Software Foundation
 2    //
 3    // Licensed under the Apache License, Version 2.0 (the "License");
 4    // you may not use this file except in compliance with the License.
 5    // You may obtain a copy of the License at
 6    //
 7    // http://www.apache.org/licenses/LICENSE-2.0
 8    //
 9    // Unless required by applicable law or agreed to in writing, software
 10    // distributed under the License is distributed on an "AS IS" BASIS,
 11    // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 12    // See the License for the specific language governing permissions and
 13    // limitations under the License.
 14   
 15    package org.apache.tapestry.services;
 16   
 17    /**
 18    * Lightweight serialization used to encode values into strings that are stored in query parameters
 19    * and hidden fields.
 20    *
 21    * @author Howard Lewis Ship
 22    * @since 4.0
 23    */
 24    public interface DataSqueezer
 25    {
 26    /**
 27    * Squeezes the data object into a String by locating an appropriate adaptor that can perform
 28    * the conversion. data may be null.
 29    */
 30    public String squeeze(Object data);
 31   
 32    /**
 33    * A convenience; invokes {@link #squeeze(Object)}for each element in the data array. If data
 34    * is null, returns null.
 35    */
 36    public String[] squeeze(Object[] data);
 37   
 38    /**
 39    * Unsqueezes the string. Note that in a special case, where the first character of the string
 40    * is not a recognized prefix, it is assumed that the string is simply a string, and returned
 41    * with no change.
 42    */
 43    public Object unsqueeze(String string);
 44   
 45    /**
 46    * Convenience method for unsqueezing many strings (back into objects).
 47    * <p>
 48    * If strings is null, returns null.
 49    */
 50    public Object[] unsqueeze(String[] strings);
 51    }