class TextPatternValidationUtils {

    public static boolean validateSegmentValue( TextPatternSegment segment, String value )
    {
        return segment.getMethod().getType().validateText( segment.getParameter(), value );
    }

}