Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

public class Main {
    public static final String DOT = ".";

    /**
     * Parse ref
     *
     * @param ref form Table.Col
     * @return String[] {Table, Col}
     */
    public static String[] getTableColRef(String ref) throws IllegalArgumentException {
        String[] res = null;
        String dot = "\\" + DOT;
        res = ref.split(dot);
        if (res.length != 2)
            throw new IllegalArgumentException("Wrong ref " + ref);
        return res;
    }
}