ttomcat-1778514358873.zip-extract/_dependencies/maven/com.h2database_h2-2.2.220/org/h2/bnf/RuleRepeat.java

Path
ttomcat-1778514358873.zip-extract/_dependencies/maven/com.h2database_h2-2.2.220/org/h2/bnf/RuleRepeat.java
Status
scanned
Type
file
Name
RuleRepeat.java
Extension
.java
Programming language
Java
Mime type
text/x-java
File type
Java source, ASCII text
Tag

      
    
Rootfs path

      
    
Size
1192 (1.2 KB)
MD5
b43794f7bbde17495585bd96e78951b2
SHA1
edf2d8dbfae3c3713656a0769e64a255828a2aff
SHA256
9f6259664ffb163e376ec11201be573aa5f472f2bb0d9ef710a8045c659004f2
SHA512

      
    
SHA1_git
28d018a09ccc9dc64c9803a3d3a54fb28096bb03
Is binary

      
    
Is text
True
Is archive

      
    
Is media

      
    
Is legal

      
    
Is manifest

      
    
Is readme

      
    
Is top level

      
    
Is key file

      
    
RuleRepeat.java | 1.2 KB |

/* * Copyright 2004-2023 H2 Group. Multiple-Licensed under the MPL 2.0, * and the EPL 1.0 (https://h2database.com/html/license.html). * Initial Developer: H2 Group */ package org.h2.bnf; import java.util.HashMap; /** * Represents a loop in a BNF object. */ public class RuleRepeat implements Rule { private final Rule rule; private final boolean comma; public RuleRepeat(Rule rule, boolean comma) { this.rule = rule; this.comma = comma; } @Override public void accept(BnfVisitor visitor) { visitor.visitRuleRepeat(comma, rule); } @Override public void setLinks(HashMap<String, RuleHead> ruleMap) { // not required, because it's already linked } @Override public boolean autoComplete(Sentence sentence) { sentence.stopIfRequired(); while (rule.autoComplete(sentence)) { // nothing to do } String s = sentence.getQuery(); while (Bnf.startWithSpace(s)) { s = s.substring(1); } sentence.setQuery(s); return true; } @Override public String toString() { return comma ? ", ..." : " ..."; } }
Detected license expression
mpl-2.0 AND epl-1.0
Detected license expression (SPDX)
MPL-2.0 AND EPL-1.0
Percentage of license text
7.63
Copyrights
- end_line: 2
  copyright: Copyright 2004-2023 H2 Group. Multiple-Licensed
  start_line: 2
Holders
- holder: H2 Group. Multiple-Licensed
  end_line: 2
  start_line: 2
Authors

      
    
License detections License expression License expression SPDX
mpl_2_0_and_epl_1_0-796bf8d7-f485-3520-923d-e6a4b1ecd2f3 mpl-2.0 AND epl-1.0 MPL-2.0 AND EPL-1.0
URL Start line End line
https://h2database.com/html/license.html 3 3
Package URL License Primary language
pkg:osgi/com.h2database.source@2.2.220