code
stringlengths
73
34.1k
label
stringclasses
1 value
public static base_response update(nitro_service client, systemcollectionparam resource) throws Exception { systemcollectionparam updateresource = new systemcollectionparam(); updateresource.communityname = resource.communityname; updateresource.loglevel = resource.loglevel; updateresource.datapath = resource.d...
java
public static base_response unset(nitro_service client, systemcollectionparam resource, String[] args) throws Exception{ systemcollectionparam unsetresource = new systemcollectionparam(); return unsetresource.unset_resource(client,args); }
java
public static systemcollectionparam get(nitro_service service) throws Exception{ systemcollectionparam obj = new systemcollectionparam(); systemcollectionparam[] response = (systemcollectionparam[])obj.get_resources(service); return response[0]; }
java
public static base_response sync(nitro_service client, gslbconfig resource) throws Exception { gslbconfig syncresource = new gslbconfig(); syncresource.preview = resource.preview; syncresource.debug = resource.debug; syncresource.forcesync = resource.forcesync; syncresource.nowarn = resource.nowarn; syncres...
java
public static int lookupShaper(String name) { if (name == null) { return NOWORDSHAPE; } else if (name.equalsIgnoreCase("dan1")) { return WORDSHAPEDAN1; } else if (name.equalsIgnoreCase("chris1")) { return WORDSHAPECHRIS1; } else if (name.equalsIgnoreCase("dan2")) { return...
java
public static String wordShape(String inStr, int wordShaper, Collection<String> knownLCWords) { // this first bit is for backwards compatibility with how things were first // implemented, where the word shaper name encodes whether to useLC. // If the shaper is in the old compatibility list, then a specif...
java
private static String wordShapeDan1(String s) { boolean digit = true; boolean upper = true; boolean lower = true; boolean mixed = true; for (int i = 0; i < s.length(); i++) { char c = s.charAt(i); if (!Character.isDigit(c)) { digit = false; } if (!Character....
java
private static String wordShapeChris2Long(String s, boolean omitIfInBoundary, int len, Collection<String> knownLCWords) { final char[] beginChars = new char[BOUNDARY_SIZE]; final char[] endChars = new char[BOUNDARY_SIZE]; int beginUpto = 0; int endUpto = 0; final Set<Character> seenSet = new Tr...
java
private static String wordShapeChris4(String s, boolean omitIfInBoundary, Collection<String> knownLCWords) { int len = s.length(); if (len <= BOUNDARY_SIZE * 2) { return wordShapeChris4Short(s, len, knownLCWords); } else { return wordShapeChris4Long(s, omitIfInBoundary, len, knownLCWords); ...
java
private static String wordShapeDan2Bio(String s, Collection<String> knownLCWords) { if (containsGreekLetter(s)) { return wordShapeDan2(s, knownLCWords) + "-GREEK"; } else { return wordShapeDan2(s, knownLCWords); } }
java
private static boolean containsGreekLetter(String s) { Matcher m = biogreek.matcher(s); return m.find(); }
java
private static String wordShapeDigits(final String s) { char[] outChars = null; for (int i = 0; i < s.length(); i++) { char c = s.charAt(i); if (Character.isDigit(c)) { if (outChars == null) { outChars = s.toCharArray(); } outChars[i] = '9'; } ...
java
public static aaagroup_authorizationpolicy_binding[] get(nitro_service service, String groupname) throws Exception{ aaagroup_authorizationpolicy_binding obj = new aaagroup_authorizationpolicy_binding(); obj.set_groupname(groupname); aaagroup_authorizationpolicy_binding response[] = (aaagroup_authorizationpolicy_b...
java
public static cachepolicylabel_policybinding_binding[] get(nitro_service service, String labelname) throws Exception{ cachepolicylabel_policybinding_binding obj = new cachepolicylabel_policybinding_binding(); obj.set_labelname(labelname); cachepolicylabel_policybinding_binding response[] = (cachepolicylabel_polic...
java
public static csvserver_copolicy_binding[] get(nitro_service service, String name) throws Exception{ csvserver_copolicy_binding obj = new csvserver_copolicy_binding(); obj.set_name(name); csvserver_copolicy_binding response[] = (csvserver_copolicy_binding[]) obj.get_resources(service); return response; }
java
public static ipseccounters_stats get(nitro_service service) throws Exception{ ipseccounters_stats obj = new ipseccounters_stats(); ipseccounters_stats[] response = (ipseccounters_stats[])obj.stat_resources(service); return response[0]; }
java
public RedwoodConfiguration clear(){ tasks = new LinkedList<Runnable>(); tasks.add(new Runnable(){ public void run(){ Redwood.clearHandlers(); Redwood.restoreSystemStreams(); Redwood.clearLoggingClasses(); } }); return this; }
java
public RedwoodConfiguration stdout(){ LogRecordHandler visibility = new VisibilityHandler(); LogRecordHandler console = Redwood.ConsoleHandler.out(); return this .rootHandler(visibility) .handler(visibility, console); }
java
public RedwoodConfiguration stderr(){ LogRecordHandler visibility = new VisibilityHandler(); LogRecordHandler console = Redwood.ConsoleHandler.err(); return this .rootHandler(visibility) .handler(visibility, console); }
java
public RedwoodConfiguration rootHandler(final LogRecordHandler handler){ tasks.add(new Runnable(){ public void run(){ Redwood.appendHandler(handler); } }); Redwood.appendHandler(handler); return this; }
java
public RedwoodConfiguration loggingClass(final String classToIgnoreInTraces){ tasks.add(new Runnable() { public void run() { Redwood.addLoggingClass(classToIgnoreInTraces); } }); return this; }
java
public RedwoodConfiguration loggingClass(final Class<?> classToIgnoreInTraces){ tasks.add(new Runnable() { public void run() { Redwood.addLoggingClass(classToIgnoreInTraces.getName()); } }); return this; }
java
public RedwoodConfiguration collapseExact(){ tasks.add(new Runnable() { public void run() { Redwood.spliceHandler(VisibilityHandler.class, new RepeatedRecordHandler(RepeatedRecordHandler.EXACT), OutputHandler.class); } }); return this; }
java
public RedwoodConfiguration captureStdout(){ tasks.add(new Runnable() { public void run() { Redwood.captureSystemStreams(true, false); } }); return this; }
java
public RedwoodConfiguration neatExit(){ tasks.add(new Runnable() { public void run() { Runtime.getRuntime().addShutdownHook(new Thread(){ @Override public void run(){ Redwood.stop(); } }); }}); return this; }
java
public RedwoodConfiguration printChannels(final int width){ tasks.add(new Runnable() { public void run() { Redwood.Util.printChannels(width);} }); return this; }
java
public RedwoodConfiguration hideChannels(final Object[] channels){ tasks.add(new Runnable() { public void run() { Redwood.hideChannels(channels); } }); return this; }
java
public RedwoodConfiguration showOnlyChannels(final Object[] channels){ tasks.add(new Runnable() { public void run() { Redwood.showOnlyChannels(channels); } }); return this; }
java
private static String get(Properties p, String key, String defaultValue, Set<String> used){ String rtn = p.getProperty(key, defaultValue); used.add(key); return rtn; }
java
public static vpnglobal_auditnslogpolicy_binding[] get(nitro_service service) throws Exception{ vpnglobal_auditnslogpolicy_binding obj = new vpnglobal_auditnslogpolicy_binding(); vpnglobal_auditnslogpolicy_binding response[] = (vpnglobal_auditnslogpolicy_binding[]) obj.get_resources(service); return response; }
java
public static vpnglobal_auditnslogpolicy_binding[] get_filtered(nitro_service service, filtervalue[] filter) throws Exception{ vpnglobal_auditnslogpolicy_binding obj = new vpnglobal_auditnslogpolicy_binding(); options option = new options(); option.set_filter(filter); vpnglobal_auditnslogpolicy_binding[] respon...
java
public static filterpolicy_csvserver_binding[] get(nitro_service service, String name) throws Exception{ filterpolicy_csvserver_binding obj = new filterpolicy_csvserver_binding(); obj.set_name(name); filterpolicy_csvserver_binding response[] = (filterpolicy_csvserver_binding[]) obj.get_resources(service); retur...
java
private static boolean isConjWithNoPrep(TreeGraphNode node, Collection<TypedDependency> list) { for (TypedDependency td : list) { if (td.gov() == node && td.reln() == CONJUNCT) { // we have a conjunct // check the POS of the dependent String tdDepPOS = td.dep().parent().value(); ...
java
public static appfwglobal_auditnslogpolicy_binding[] get(nitro_service service) throws Exception{ appfwglobal_auditnslogpolicy_binding obj = new appfwglobal_auditnslogpolicy_binding(); appfwglobal_auditnslogpolicy_binding response[] = (appfwglobal_auditnslogpolicy_binding[]) obj.get_resources(service); return res...
java
public static base_response update(nitro_service client, lbsipparameters resource) throws Exception { lbsipparameters updateresource = new lbsipparameters(); updateresource.rnatsrcport = resource.rnatsrcport; updateresource.rnatdstport = resource.rnatdstport; updateresource.retrydur = resource.retrydur; updat...
java
public static base_response unset(nitro_service client, lbsipparameters resource, String[] args) throws Exception{ lbsipparameters unsetresource = new lbsipparameters(); return unsetresource.unset_resource(client,args); }
java
public static lbsipparameters get(nitro_service service) throws Exception{ lbsipparameters obj = new lbsipparameters(); lbsipparameters[] response = (lbsipparameters[])obj.get_resources(service); return response[0]; }
java
public static base_response add(nitro_service client, appfwjsoncontenttype resource) throws Exception { appfwjsoncontenttype addresource = new appfwjsoncontenttype(); addresource.jsoncontenttypevalue = resource.jsoncontenttypevalue; addresource.isregex = resource.isregex; return addresource.add_resource(client)...
java
public static base_responses add(nitro_service client, appfwjsoncontenttype resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { appfwjsoncontenttype addresources[] = new appfwjsoncontenttype[resources.length]; for (int i=0;i<resources.length;i++){ ...
java
public static base_response delete(nitro_service client, String jsoncontenttypevalue) throws Exception { appfwjsoncontenttype deleteresource = new appfwjsoncontenttype(); deleteresource.jsoncontenttypevalue = jsoncontenttypevalue; return deleteresource.delete_resource(client); }
java
public static base_responses delete(nitro_service client, String jsoncontenttypevalue[]) throws Exception { base_responses result = null; if (jsoncontenttypevalue != null && jsoncontenttypevalue.length > 0) { appfwjsoncontenttype deleteresources[] = new appfwjsoncontenttype[jsoncontenttypevalue.length]; for (...
java
public static appfwjsoncontenttype[] get(nitro_service service, options option) throws Exception{ appfwjsoncontenttype obj = new appfwjsoncontenttype(); appfwjsoncontenttype[] response = (appfwjsoncontenttype[])obj.get_resources(service,option); return response; }
java
public static appfwjsoncontenttype get(nitro_service service, String jsoncontenttypevalue) throws Exception{ appfwjsoncontenttype obj = new appfwjsoncontenttype(); obj.set_jsoncontenttypevalue(jsoncontenttypevalue); appfwjsoncontenttype response = (appfwjsoncontenttype) obj.get_resource(service); return respons...
java
public static appfwjsoncontenttype[] get(nitro_service service, String jsoncontenttypevalue[]) throws Exception{ if (jsoncontenttypevalue !=null && jsoncontenttypevalue.length>0) { appfwjsoncontenttype response[] = new appfwjsoncontenttype[jsoncontenttypevalue.length]; appfwjsoncontenttype obj[] = new appfwjson...
java
public Tree determineHead(Tree t, Tree parent) { if (nonTerminalInfo == null) { throw new RuntimeException("Classes derived from AbstractCollinsHeadFinder must" + " create and fill HashMap nonTerminalInfo."); } if (t == null || t.isLeaf()) { return null; } if (DEBUG) { Syst...
java
protected Tree determineNonTrivialHead(Tree t, Tree parent) { Tree theHead = null; String motherCat = tlp.basicCategory(t.label().value()); if (DEBUG) { System.err.println("Looking for head of " + t.label() + "; value is |" + t.label().value() + "|, " + ...
java
public static base_response add(nitro_service client, policydataset resource) throws Exception { policydataset addresource = new policydataset(); addresource.name = resource.name; addresource.type = resource.type; addresource.indextype = resource.indextype; return addresource.add_resource(client); }
java
public static policydataset[] get(nitro_service service) throws Exception{ policydataset obj = new policydataset(); policydataset[] response = (policydataset[])obj.get_resources(service); return response; }
java
public static policydataset get(nitro_service service, String name) throws Exception{ policydataset obj = new policydataset(); obj.set_name(name); policydataset response = (policydataset) obj.get_resource(service); return response; }
java
public static boolean isSinglePositionPrefix(FieldInfo fieldInfo, String prefix) throws IOException { if (fieldInfo == null) { throw new IOException("no fieldInfo"); } else { String info = fieldInfo.getAttribute( MtasCodecPostingsFormat.MTAS_FIELDINFO_ATTRIBUTE_PREFIX_SINGLE_POSITION...
java
public static String termValue(String term) { int i = term.indexOf(MtasToken.DELIMITER); String value = null; if (i >= 0) { value = term.substring((i + MtasToken.DELIMITER.length())); value = (value.length() > 0) ? value : null; } return (value == null) ? null : value.replace("\u0000", "...
java
public static String termPrefix(String term) { int i = term.indexOf(MtasToken.DELIMITER); String prefix = term; if (i >= 0) { prefix = term.substring(0, i); } return prefix.replace("\u0000", ""); }
java
static SortedSet<String> createStatsItems(String statsType) throws IOException { SortedSet<String> statsItems = new TreeSet<>(); SortedSet<String> functionItems = new TreeSet<>(); if (statsType != null) { Matcher m = fpStatsItems.matcher(statsType.trim()); while (m.find()) { String...
java
static String createStatsType(Set<String> statsItems, String sortType, MtasFunctionParserFunction functionParser) { String statsType = STATS_BASIC; for (String statsItem : statsItems) { if (STATS_FULL_TYPES.contains(statsItem)) { statsType = STATS_FULL; break; } else if (STATS_...
java
public static appfwwsdl get(nitro_service service) throws Exception{ appfwwsdl obj = new appfwwsdl(); appfwwsdl[] response = (appfwwsdl[])obj.get_resources(service); return response[0]; }
java
public static appfwwsdl get(nitro_service service, String name) throws Exception{ appfwwsdl obj = new appfwwsdl(); obj.set_name(name); appfwwsdl response = (appfwwsdl) obj.get_resource(service); return response; }
java
public static lbvserver_servicegroup_binding[] get(nitro_service service, String name) throws Exception{ lbvserver_servicegroup_binding obj = new lbvserver_servicegroup_binding(); obj.set_name(name); lbvserver_servicegroup_binding response[] = (lbvserver_servicegroup_binding[]) obj.get_resources(service); retur...
java
public static base_response kill(nitro_service client, systemsession resource) throws Exception { systemsession killresource = new systemsession(); killresource.sid = resource.sid; killresource.all = resource.all; return killresource.perform_operation(client,"kill"); }
java
public static base_responses kill(nitro_service client, systemsession resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { systemsession killresources[] = new systemsession[resources.length]; for (int i=0;i<resources.length;i++){ killresources[i] =...
java
public static systemsession[] get(nitro_service service) throws Exception{ systemsession obj = new systemsession(); systemsession[] response = (systemsession[])obj.get_resources(service); return response; }
java
public static systemsession get(nitro_service service, Long sid) throws Exception{ systemsession obj = new systemsession(); obj.set_sid(sid); systemsession response = (systemsession) obj.get_resource(service); return response; }
java
public static systemsession[] get(nitro_service service, Long sid[]) throws Exception{ if (sid !=null && sid.length>0) { systemsession response[] = new systemsession[sid.length]; systemsession obj[] = new systemsession[sid.length]; for (int i=0;i<sid.length;i++) { obj[i] = new systemsession(); obj[i]...
java
public static base_response update(nitro_service client, snmpalarm resource) throws Exception { snmpalarm updateresource = new snmpalarm(); updateresource.trapname = resource.trapname; updateresource.thresholdvalue = resource.thresholdvalue; updateresource.normalvalue = resource.normalvalue; updateresource.ti...
java
public static base_responses update(nitro_service client, snmpalarm resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { snmpalarm updateresources[] = new snmpalarm[resources.length]; for (int i=0;i<resources.length;i++){ updateresources[i] = new s...
java
public static base_response unset(nitro_service client, snmpalarm resource, String[] args) throws Exception{ snmpalarm unsetresource = new snmpalarm(); unsetresource.trapname = resource.trapname; return unsetresource.unset_resource(client,args); }
java
public static base_responses unset(nitro_service client, String trapname[], String args[]) throws Exception { base_responses result = null; if (trapname != null && trapname.length > 0) { snmpalarm unsetresources[] = new snmpalarm[trapname.length]; for (int i=0;i<trapname.length;i++){ unsetresources[i] = n...
java
public static base_response enable(nitro_service client, String trapname) throws Exception { snmpalarm enableresource = new snmpalarm(); enableresource.trapname = trapname; return enableresource.perform_operation(client,"enable"); }
java
public static base_responses enable(nitro_service client, String trapname[]) throws Exception { base_responses result = null; if (trapname != null && trapname.length > 0) { snmpalarm enableresources[] = new snmpalarm[trapname.length]; for (int i=0;i<trapname.length;i++){ enableresources[i] = new snmpalarm...
java
public static base_response disable(nitro_service client, String trapname) throws Exception { snmpalarm disableresource = new snmpalarm(); disableresource.trapname = trapname; return disableresource.perform_operation(client,"disable"); }
java
public static base_responses disable(nitro_service client, String trapname[]) throws Exception { base_responses result = null; if (trapname != null && trapname.length > 0) { snmpalarm disableresources[] = new snmpalarm[trapname.length]; for (int i=0;i<trapname.length;i++){ disableresources[i] = new snmpal...
java
public static snmpalarm[] get(nitro_service service) throws Exception{ snmpalarm obj = new snmpalarm(); snmpalarm[] response = (snmpalarm[])obj.get_resources(service); return response; }
java
public static snmpalarm get(nitro_service service, String trapname) throws Exception{ snmpalarm obj = new snmpalarm(); obj.set_trapname(trapname); snmpalarm response = (snmpalarm) obj.get_resource(service); return response; }
java
public static snmpalarm[] get(nitro_service service, String trapname[]) throws Exception{ if (trapname !=null && trapname.length>0) { snmpalarm response[] = new snmpalarm[trapname.length]; snmpalarm obj[] = new snmpalarm[trapname.length]; for (int i=0;i<trapname.length;i++) { obj[i] = new snmpalarm(); ...
java
public static dnsglobal_binding get(nitro_service service) throws Exception{ dnsglobal_binding obj = new dnsglobal_binding(); dnsglobal_binding response = (dnsglobal_binding) obj.get_resource(service); return response; }
java
public static base_response create(nitro_service client, sslfipskey resource) throws Exception { sslfipskey createresource = new sslfipskey(); createresource.fipskeyname = resource.fipskeyname; createresource.modulus = resource.modulus; createresource.exponent = resource.exponent; return createresource.perfor...
java
public static base_responses create(nitro_service client, sslfipskey resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { sslfipskey createresources[] = new sslfipskey[resources.length]; for (int i=0;i<resources.length;i++){ createresources[i] = ne...
java
public static base_response delete(nitro_service client, String fipskeyname) throws Exception { sslfipskey deleteresource = new sslfipskey(); deleteresource.fipskeyname = fipskeyname; return deleteresource.delete_resource(client); }
java
public static base_responses delete(nitro_service client, String fipskeyname[]) throws Exception { base_responses result = null; if (fipskeyname != null && fipskeyname.length > 0) { sslfipskey deleteresources[] = new sslfipskey[fipskeyname.length]; for (int i=0;i<fipskeyname.length;i++){ deleteresources[i...
java
public static base_response Import(nitro_service client, sslfipskey resource) throws Exception { sslfipskey Importresource = new sslfipskey(); Importresource.fipskeyname = resource.fipskeyname; Importresource.key = resource.key; Importresource.inform = resource.inform; Importresource.wrapkeyname = resource.wr...
java
public static base_responses Import(nitro_service client, sslfipskey resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { sslfipskey Importresources[] = new sslfipskey[resources.length]; for (int i=0;i<resources.length;i++){ Importresources[i] = ne...
java
public static base_response export(nitro_service client, sslfipskey resource) throws Exception { sslfipskey exportresource = new sslfipskey(); exportresource.fipskeyname = resource.fipskeyname; exportresource.key = resource.key; return exportresource.perform_operation(client,"export"); }
java
public static base_responses export(nitro_service client, sslfipskey resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { sslfipskey exportresources[] = new sslfipskey[resources.length]; for (int i=0;i<resources.length;i++){ exportresources[i] = ne...
java
public static sslfipskey[] get(nitro_service service) throws Exception{ sslfipskey obj = new sslfipskey(); sslfipskey[] response = (sslfipskey[])obj.get_resources(service); return response; }
java
public static sslfipskey get(nitro_service service, String fipskeyname) throws Exception{ sslfipskey obj = new sslfipskey(); obj.set_fipskeyname(fipskeyname); sslfipskey response = (sslfipskey) obj.get_resource(service); return response; }
java
public static sslfipskey[] get(nitro_service service, String fipskeyname[]) throws Exception{ if (fipskeyname !=null && fipskeyname.length>0) { sslfipskey response[] = new sslfipskey[fipskeyname.length]; sslfipskey obj[] = new sslfipskey[fipskeyname.length]; for (int i=0;i<fipskeyname.length;i++) { obj[i...
java
public static aaauser_vpntrafficpolicy_binding[] get(nitro_service service, String username) throws Exception{ aaauser_vpntrafficpolicy_binding obj = new aaauser_vpntrafficpolicy_binding(); obj.set_username(username); aaauser_vpntrafficpolicy_binding response[] = (aaauser_vpntrafficpolicy_binding[]) obj.get_resou...
java
public static gslbdomain_stats[] get(nitro_service service) throws Exception{ gslbdomain_stats obj = new gslbdomain_stats(); gslbdomain_stats[] response = (gslbdomain_stats[])obj.stat_resources(service); return response; }
java
public static gslbdomain_stats get(nitro_service service, String name) throws Exception{ gslbdomain_stats obj = new gslbdomain_stats(); obj.set_name(name); gslbdomain_stats response = (gslbdomain_stats) obj.stat_resource(service); return response; }
java
public static base_response Import(nitro_service client, appfwsignatures resource) throws Exception { appfwsignatures Importresource = new appfwsignatures(); Importresource.src = resource.src; Importresource.name = resource.name; Importresource.xslt = resource.xslt; Importresource.comment = resource.comment; ...
java
public static base_response change(nitro_service client, appfwsignatures resource) throws Exception { appfwsignatures updateresource = new appfwsignatures(); updateresource.name = resource.name; updateresource.mergedefault = resource.mergedefault; return updateresource.perform_operation(client,"update"); }
java
public static appfwsignatures get(nitro_service service) throws Exception{ appfwsignatures obj = new appfwsignatures(); appfwsignatures[] response = (appfwsignatures[])obj.get_resources(service); return response[0]; }
java
public static appfwsignatures get(nitro_service service, String name) throws Exception{ appfwsignatures obj = new appfwsignatures(); obj.set_name(name); appfwsignatures response = (appfwsignatures) obj.get_resource(service); return response; }
java
final public void addPosition(int position) { if (tokenPosition == null) { tokenPosition = new MtasPosition(position); } else { tokenPosition.add(position); } }
java
final public void addPositionRange(int start, int end) { if (tokenPosition == null) { tokenPosition = new MtasPosition(start, end); } else { int[] positions = new int[end - start + 1]; for (int i = start; i <= end; i++) { positions[i - start] = i; } tokenPosition.add(positi...
java
final public Boolean checkPositionType(String type) { if (tokenPosition == null) { return false; } else { return tokenPosition.checkType(type); } }
java
final public Boolean checkRealOffset() { if ((tokenRealOffset == null) || !provideRealOffset) { return false; } else if (tokenOffset == null) { return true; } else if (tokenOffset.getStart() == tokenRealOffset.getStart() && tokenOffset.getEnd() == tokenRealOffset.getEnd()) { return...
java
final public void addOffset(Integer start, Integer end) { if (tokenOffset == null) { setOffset(start, end); } else if ((start == null) || (end == null)) { // do nothing } else if (start > end) { throw new IllegalArgumentException("Start offset after end offset"); } else { tokenOf...
java
final public void setRealOffset(Integer start, Integer end) { if ((start == null) || (end == null)) { // do nothing } else if (start > end) { throw new IllegalArgumentException( "Start real offset after end real offset"); } else { tokenRealOffset = new MtasOffset(start, end); ...
java
public static String getPrefixFromValue(String value) { if (value == null) { return null; } else if (value.contains(DELIMITER)) { String[] list = value.split(DELIMITER); if (list != null && list.length > 0) { return list[0].replaceAll("\u0000", ""); } else { return null; ...
java
public static Map<String, Automaton> createAutomatonMap(String prefix, List<String> valueList, Boolean filter) { HashMap<String, Automaton> automatonMap = new HashMap<>(); if (valueList != null) { for (String item : valueList) { if (filter) { item = item.replaceAll("([\\\"\\)\\(\\<...
java