Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
package org.cdlflex.ui.util.convert;
Simplified version of an IConverter that converts objects to string (i.e. a functional interface for externalising a "toString" method.

<T> The type to be converted
public abstract class ToStringConverter<T> implements IConverter<T> {
    private static final long serialVersionUID = 1L;
    public T convertToObject(String valueLocale localethrows ConversionException {
        throw new UnsupportedOperationException("ToStringConverter can only convert one way");
    public String convertToString(T valueLocale locale) {
        return convertToString(value);

Convert the given value to a string.

value the value to convert
a string representation of the value
    public abstract String convertToString(T value);
New to GrepCode? Check out our FAQ X