All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.agimatec.sql.meta.script.ExtractSeparator Maven / Gradle / Ivy

There is a newer version: 2.5.27
Show newest version
package com.agimatec.sql.meta.script;

/**
 * Description:   
* Copyright: Copyright (c) 2007
* Company: Agimatec GmbH
* * @author Roman Stumm */ class ExtractSeparator extends A_ExtractPart { private final String separator; /** * @param aSeparator - "," or "(" or ")" */ public ExtractSeparator(String aSeparator) { separator = aSeparator; } public ExtractSeparator() { separator = null; } public boolean isAnySep() { return separator == null; } public int process(String aToken, PropertiesExtractor extractor) { return C_ERROR; } /** * C_FIT_NOT = -1; // NOT OK, use next part, next token * C_ERROR = 0; // NOT OK, error. stop! * C_FIT = 1; // OK, use next part, next token * C_MAY_FIT = 2; // OK, use next park, keep (or concat) token * C_NOT_HANDLED = 3; // UNKNOWN, use next part, keep token * * @param aToken * @return */ public int fits(String aToken) { if (separator == null) { return C_MAY_FIT; } else if (separator.equals(aToken)) { return C_FIT; } else { return C_FIT_NOT; } } public String toString() { return separator == null ? "'?'" : "'" + separator + "'"; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy