~ubuntu-branches/ubuntu/karmic/apgdiff/karmic

« back to all changes in this revision

Viewing changes to src/main/java/cz/startnet/utils/pgdiff/PgDiffUtils.java

  • Committer: Bazaar Package Importer
  • Author(s): Christoph Berg
  • Date: 2008-09-09 15:42:54 UTC
  • Revision ID: james.westby@ubuntu.com-20080909154254-458sv7ew1rczdal1
Tags: upstream-1.2
ImportĀ upstreamĀ versionĀ 1.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * $Id: PgDiffUtils.java 80 2007-09-01 20:25:45Z fordfrog $
 
3
 */
 
4
package cz.startnet.utils.pgdiff;
 
5
 
 
6
/**
 
7
 * Utilities for creation of diffs.
 
8
 *
 
9
 * @author fordfrog
 
10
 * @version $Id: PgDiffUtils.java 80 2007-09-01 20:25:45Z fordfrog $
 
11
 */
 
12
public class PgDiffUtils {
 
13
    /**
 
14
     * Creates a new PgDiffUtils object.
 
15
     */
 
16
    private PgDiffUtils() {
 
17
        super();
 
18
    }
 
19
 
 
20
    /**
 
21
     * If <code>quoteName</code> is true then returns quoted name
 
22
     * otherwise returns the original name.
 
23
     *
 
24
     * @param name name
 
25
     * @param quoteName whether the name should be quoted
 
26
     *
 
27
     * @return if <code>quoteName</code> is true then returns quoted name
 
28
     *         otherwise returns the original name
 
29
     */
 
30
    public static String getQuotedName(
 
31
        final String name,
 
32
        final boolean quoteName) {
 
33
        return quoteName ? ("\"" + name + "\"") : name;
 
34
    }
 
35
}