Here you can find the source of convertStringFormat(String property)
public static String convertStringFormat(String property)
//package com.java2s; /******************************************************************************* * Copyright (c) 2010 Actuate Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors:/*from w w w .j a v a 2 s . c om*/ * Actuate Corporation - initial API and implementation *******************************************************************************/ public class Main { public static String ZIP = "@@@@@-@@@@"; public static String PHONE = "(@@@)@@@-@@@@"; public static String SOCIAL = "@@@-@@-@@@@"; public static String ZIP_CODE = "00000\\-0000"; public static String PHONE_CODE = "[<=9999999]###\\-####;\\(###\\)\\ ###\\-####"; public static String SOCIALNUMBER_CODE = "000\\-00\\-0000"; public static String convertStringFormat(String property) { if (property == null) return null; if (ZIP.equals(property)) return ZIP_CODE; if (PHONE.equals(property)) return PHONE_CODE; if (SOCIAL.equals(property)) return SOCIALNUMBER_CODE; return property; } }