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

org.cthul.strings.format.pattern.PatternChoice Maven / Gradle / Ivy

Go to download

Functions for converting strings from and to various formats, such as roman numbers, alpha indices, Java identifiers, and format strings.

The newest version!
 package org.cthul.strings.format.pattern;

import org.cthul.strings.format.PatternAPI;

/**
 *
 * @author Arian Treffer
 */
public class PatternChoice extends PatternSet {

    public PatternChoice(PatternAPI api, int groupCount) {
        super(api, groupCount);
    }

    public PatternChoice(PatternAPI api) {
        super(api);
    }
    
    @Override
    protected void beforeFirstSubpattern() {
        baseAPI().append("(?:");
    }
    
    @Override
    protected void nextSubpattern() {
        baseAPI().append('|');
    }
    
    @Override
    protected void afterLastSubpattern() {
        baseAPI().append(')');
    }
        
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy