Here you can find the source of quoted(String value)
Parameter | Description |
---|---|
value | the value |
public static String quoted(String value)
//package com.java2s; /*// ww w . j a va 2 s . c o m * Copyright (c) 2015 Hewlett-Packard Development Company, L.P. and others. 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 */ public class Main { /** Returns the given value wrapped in double-quote characters (") if the * value is not null, or the string {@code "null"} if it is null. * * @param value the value * @return the string quoted (if not null), or "null" */ public static String quoted(String value) { return value == null ? "null" : "\"" + value + "\""; } }