yijunyu/c-to-rust huggingface dataset:
// Original:
public DeleteDBSecurityGroupResult deleteDBSecurityGroup(DeleteDBSecurityGroupRequest request) {request = beforeClientExecution(request);return executeDeleteDBSecurityGroup(request);}

// Translation:
public virtual DeleteDBSecurityGroupResponse DeleteDBSecurityGroup(DeleteDBSecurityGroupRequest request){var options = new InvokeOptions();options.RequestMarshaller = DeleteDBSecurityGroupRequestMarshaller.Instance;options.ResponseUnmarshaller = DeleteDBSecurityGroupResponseUnmarshaller.Instance;return Invoke<DeleteDBSecurityGroupResponse>(request, options);}
// Original:
public static FormulaError forInt(int type) throws IllegalArgumentException {FormulaError err = imap.get(type);if(err == null) err = bmap.get((byte)type);if(err == null) throw new IllegalArgumentException("Unknown error type: " + type);return err;}

// Translation:
public static FormulaError ForInt(byte type){if (bmap.ContainsKey(type))return bmap[type];throw new ArgumentException("Unknown error type: " + type);}
// Original:
public void finish(StringBuffer toAppendTo) {if (hStart >= 0 && !showAmPm) {for (int i = 0; i < hLen; i++) {toAppendTo.setCharAt(hStart + i, 'H');}}}

// Translation:
public void Finish(StringBuilder toAppendTo){if (hStart >= 0 && !_formatter.ShowAmPm){for (int i = 0; i < hLen; i++){toAppendTo[hStart + i] = 'H';}}}
// Original:
public SendRawEmailResult sendRawEmail(SendRawEmailRequest request) {request = beforeClientExecution(request);return executeSendRawEmail(request);}

// Translation:
public virtual SendRawEmailResponse SendRawEmail(SendRawEmailRequest request){var options = new InvokeOptions();options.RequestMarshaller = SendRawEmailRequestMarshaller.Instance;options.ResponseUnmarshaller = SendRawEmailResponseUnmarshaller.Instance;return Invoke<SendRawEmailResponse>(request, options);}
// Original:
public void clear() {if ( readonly ) throw new IllegalStateException("can't alter readonly IntervalSet");intervals.clear();}

// Translation:
public virtual void Clear(){if (@readonly){throw new InvalidOperationException("can't alter readonly IntervalSet");}intervals.Clear();}
// Original:
public int previous() {if (current == start) {return DONE;} else {return first();}}

// Translation:
public override int Previous(){if (current == start){return Done;}else{return First();}}
// Original:
public DeleteDocumentClassifierResult deleteDocumentClassifier(DeleteDocumentClassifierRequest request) {request = beforeClientExecution(request);return executeDeleteDocumentClassifier(request);}

// Translation:
public virtual DeleteDocumentClassifierResponse DeleteDocumentClassifier(DeleteDocumentClassifierRequest request){var options = new InvokeOptions();options.RequestMarshaller = DeleteDocumentClassifierRequestMarshaller.Instance;options.ResponseUnmarshaller = DeleteDocumentClassifierResponseUnmarshaller.Instance;return Invoke<DeleteDocumentClassifierResponse>(request, options);}
// Original:
public DeleteDeviceAllGroupRequest() {super("LinkFace", "2018-07-20", "DeleteDeviceAllGroup");setProtocol(ProtocolType.HTTPS);setMethod(MethodType.POST);}

// Translation:
public DeleteDeviceAllGroupRequest(): base("LinkFace", "2018-07-20", "DeleteDeviceAllGroup"){Protocol = ProtocolType.HTTPS;Method = MethodType.POST;}
// Original:
public String toString() {StringBuilder sb = new StringBuilder();sb.append(getClass().getName());sb.append(" [");sb.append("sheetIx=").append(getExternSheetIndex());sb.append(" ! ");sb.append(formatReferenceAsString());sb.append("]");return sb.toString();}

// Translation:
public override String ToString(){CellReference cr = new CellReference(Row, Column, !IsRowRelative, !IsColRelative);StringBuilder sb = new StringBuilder();sb.Append(GetType().Name);sb.Append(" [");sb.Append("sheetIx=").Append(ExternSheetIndex);sb.Append(" ! ");sb.Append(cr.FormatAsString());sb.Append("]");return sb.ToString();}
// Original:
public CreateBGPPeerResult createBGPPeer(CreateBGPPeerRequest request) {request = beforeClientExecution(request);return executeCreateBGPPeer(request);}

// Translation:
public virtual CreateBGPPeerResponse CreateBGPPeer(CreateBGPPeerRequest request){var options = new InvokeOptions();options.RequestMarshaller = CreateBGPPeerRequestMarshaller.Instance;options.ResponseUnmarshaller = CreateBGPPeerResponseUnmarshaller.Instance;return Invoke<CreateBGPPeerResponse>(request, options);}
// Original:
public String toASCIIString() {StringBuilder result = new StringBuilder();ASCII_ONLY.appendEncoded(result, toString());return result.toString();}

// Translation:
public string toASCIIString(){java.lang.StringBuilder result = new java.lang.StringBuilder();ASCII_ONLY.appendEncoded(result, ToString());return result.ToString();}
// Original:
public CharSequence subSequence(int start, int end) {int remaining = end - start;StringBuilder sb = new StringBuilder(remaining);int blockIdx = blockIndex(start);int indexInBlock = indexInBlock(start);while (remaining > 0) {Block b = blocks.get(blockIdx++);int numToAppend = Math.min(remaining, b.length - indexInBlock);sb.append(b.chars, indexInBlock, numToAppend);remaining -= numToAppend;indexInBlock = 0; }return sb.toString();}

// Translation:
public virtual ICharSequence Subsequence(int startIndex, int length){int remaining = length;StringBuilder sb = new StringBuilder(remaining);int blockIdx = BlockIndex(startIndex);int indexInBlock = IndexInBlock(startIndex);while (remaining > 0){Block b = blocks[blockIdx++];int numToAppend = Math.Min(remaining, b.length - indexInBlock);sb.Append(b.chars, indexInBlock, numToAppend);remaining -= numToAppend;indexInBlock = 0; }return new StringBuilderCharSequence(sb);}
// Original:
public long get(int index) {final int o = index >>> 3;final int b = index & 7;final int shift = b << 3;return (blocks[o] >>> shift) & 255L;}

// Translation:
public override long Get(int index){int o = (int)((uint)index >> 3);int b = index & 7;int shift = b << 3;return ((long)((ulong)blocks[o] >> shift)) & 255L;}
// Original:
public static Collection<String> getNotSupportedFunctionNames() {Collection<String> lst = new TreeSet<>();for (int i = 0; i < functions.length; i++) {Function func = functions[i];if (func != null && (func instanceof NotImplementedFunction)) {FunctionMetadata metaData = FunctionMetadataRegistry.getFunctionByIndex(i);lst.add(metaData.getName());}}lst.remove("INDIRECT"); return Collections.unmodifiableCollection(lst);}

// Translation:
public static ReadOnlyCollection<String> GetNotSupportedFunctionNames(){List<String> lst = new List<String>();for (int i = 0; i < functions.Length; i++){Function func = functions[i];if (func != null && (func is NotImplementedFunction)){FunctionMetadata metaData = FunctionMetadataRegistry.GetFunctionByIndex(i);lst.Add(metaData.Name);}}lst.Remove("INDIRECT"); return lst.AsReadOnly(); }
// Original:
public ItalianLightStemFilterFactory(Map<String,String> args) {super(args);if (!args.isEmpty()) {throw new IllegalArgumentException("Unknown parameters: " + args);}}

// Translation:
public ItalianLightStemFilterFactory(IDictionary<string, string> args): base(args){if (args.Count > 0){throw new System.ArgumentException("Unknown parameters: " + args);}}
// Original:
public void write(LittleEndianOutput out) {out.writeByte(sid + getPtgClass());out.writeByte(getNumberOfOperands());out.writeShort(getFunctionIndex());}

// Translation:
public override void Write(ILittleEndianOutput out1){out1.WriteByte(sid + PtgClass);out1.WriteByte(_numberOfArgs);out1.WriteShort(_functionIndex);}
// Original:
public String getTokenErrorDisplay(Token t) {if ( t==null ) return "<no token>";String s = t.getText();if ( s==null ) {if ( t.getType()==Token.EOF ) {s = "<EOF>";}else {s = "<"+t.getType()+">";}}s = s.replace("\n","\\n");s = s.replace("\r","\\r");s = s.replace("\t","\\t");return "'"+s+"'";}

// Translation:
public virtual string GetTokenErrorDisplay(IToken t){if (t == null){return "<no token>";}string s = t.Text;if (s == null){if (t.Type == TokenConstants.EOF){s = "<EOF>";}else{s = "<" + t.Type + ">";}}s = s.Replace("\n", "\\n");s = s.Replace("\r", "\\r");s = s.Replace("\t", "\\t");return "'" + s + "'";}
// Original:
public NumericPayloadTokenFilter create(TokenStream input) {return new NumericPayloadTokenFilter(input,payload,typeMatch);}

// Translation:
public override TokenStream Create(TokenStream input){return new NumericPayloadTokenFilter(input, payload, typeMatch);}
// Original:
public void incrementDrawingsSaved(){dgg.setDrawingsSaved(dgg.getDrawingsSaved()+1);}

// Translation:
public void IncrementDrawingsSaved(){dgg.DrawingsSaved = dgg.DrawingsSaved + 1;}
// Original:
public UploadSigningCertificateRequest(String certificateBody) {setCertificateBody(certificateBody);}

// Translation:
public UploadSigningCertificateRequest(string certificateBody){_certificateBody = certificateBody;}
// Original:
public DeleteJourneyResult deleteJourney(DeleteJourneyRequest request) {request = beforeClientExecution(request);return executeDeleteJourney(request);}

// Translation:
public virtual DeleteJourneyResponse DeleteJourney(DeleteJourneyRequest request){var options = new InvokeOptions();options.RequestMarshaller = DeleteJourneyRequestMarshaller.Instance;options.ResponseUnmarshaller = DeleteJourneyResponseUnmarshaller.Instance;return Invoke<DeleteJourneyResponse>(request, options);}
// Original:
public void reset() {ptr = mark;}

// Translation:
public override void Reset(){ptr = mark;}
// Original:
public DescribeInstanceHealthRequest(String loadBalancerName) {setLoadBalancerName(loadBalancerName);}

// Translation:
public DescribeInstanceHealthRequest(string loadBalancerName){_loadBalancerName = loadBalancerName;}
// Original:
public static Automaton toAutomaton(Term wildcardquery) {List<Automaton> automata = new ArrayList<>();String wildcardText = wildcardquery.text();for (int i = 0; i < wildcardText.length();) {final int c = wildcardText.codePointAt(i);int length = Character.charCount(c);switch(c) {case WILDCARD_STRING:automata.add(Automata.makeAnyString());break;case WILDCARD_CHAR:automata.add(Automata.makeAnyChar());break;case WILDCARD_ESCAPE:if (i + length < wildcardText.length()) {final int nextChar = wildcardText.codePointAt(i + length);length += Character.charCount(nextChar);automata.add(Automata.makeChar(nextChar));break;} default:automata.add(Automata.makeChar(c));}i += length;}return Operations.concatenate(automata);}

// Translation:
public static Automaton ToAutomaton(Term wildcardquery){IList<Automaton> automata = new List<Automaton>();string wildcardText = wildcardquery.Text();for (int i = 0; i < wildcardText.Length; ){int c = Character.CodePointAt(wildcardText, i);int length = Character.CharCount(c);switch (c){case WILDCARD_STRING:automata.Add(BasicAutomata.MakeAnyString());break;case WILDCARD_CHAR:automata.Add(BasicAutomata.MakeAnyChar());break;case WILDCARD_ESCAPE:if (i + length < wildcardText.Length){int nextChar = Character.CodePointAt(wildcardText, i + length);length += Character.CharCount(nextChar);automata.Add(BasicAutomata.MakeChar(nextChar));break;} goto default;default:automata.Add(BasicAutomata.MakeChar(c));break;}i += length;}return BasicOperations.Concatenate(automata);}
// Original:
public boolean equals(Object obj) {if (this == obj)return true;if (obj == null)return false;if (obj instanceof ExtendedFormatRecord) {final ExtendedFormatRecord other = (ExtendedFormatRecord) obj;if (field_1_font_index != other.field_1_font_index)return false;if (field_2_format_index != other.field_2_format_index)return false;if (field_3_cell_options != other.field_3_cell_options)return false;if (field_4_alignment_options != other.field_4_alignment_options)return false;if (field_5_indention_options != other.field_5_indention_options)return false;if (field_6_border_options != other.field_6_border_options)return false;if (field_7_palette_options != other.field_7_palette_options)return false;if (field_8_adtl_palette_options != other.field_8_adtl_palette_options)return false;if (field_9_fill_palette_options != other.field_9_fill_palette_options)return false;return true;}return false;}

// Translation:
public override bool Equals(Object obj){if (this == obj)return true;if (obj == null)return false;if (obj is ExtendedFormatRecord){ExtendedFormatRecord other = (ExtendedFormatRecord)obj;if (field_1_font_index != other.field_1_font_index)return false;if (field_2_format_index != other.field_2_format_index)return false;if (field_3_cell_options != other.field_3_cell_options)return false;if (field_4_alignment_options != other.field_4_alignment_options)return false;if (field_5_indention_options != other.field_5_indention_options)return false;if (field_6_border_options != other.field_6_border_options)return false;if (field_7_palette_options != other.field_7_palette_options)return false;if (field_8_adtl_palette_options != other.field_8_adtl_palette_options)return false;if (field_9_fill_palette_options != other.field_9_fill_palette_options)return false;return true;}return false;}
// Original:
public short[] getTriplet(){return new short[]{(short) (_red   & 0xff),(short) (_green & 0xff),(short) (_blue  & 0xff)};}

// Translation:
public override byte[] GetTriplet(){return new byte[]{(byte)(red   & 0xff),(byte)(green & 0xff),(byte)(blue  & 0xff)};}
// Original:
public BlameCommand setFollowFileRenames(boolean follow) {followFileRenames = Boolean.valueOf(follow);return this;}

// Translation:
public virtual NGit.Api.BlameCommand SetFollowFileRenames(bool follow){followFileRenames = Sharpen.Extensions.ValueOf(follow);return this;}
// Original:
public StringMatcher(String value, CmpOp operator) {super(operator);_value = value;switch(operator.getCode()) {case CmpOp.NONE:case CmpOp.EQ:case CmpOp.NE:_pattern = getWildCardPattern(value);break;default:_pattern = null;}}

// Translation:
public StringMatcher(String value, CmpOp optr):base(optr){_value = value;_operator = optr;switch (optr.Code){case CmpOp.NONE:case CmpOp.EQ:case CmpOp.NE:_pattern = GetWildCardPattern(value);break;default:_pattern = null;break;}}
// Original:
public DefaultColWidthRecord() {field_1_col_width = DEFAULT_COLUMN_WIDTH;}

// Translation:
public DefaultColWidthRecord(){field_1_col_width = DEFAULT_COLUMN_WIDTH;}
// Original:
public GetIndustryInfoListRequest() {super("industry-brain", "2018-07-12", "GetIndustryInfoList");setProtocol(ProtocolType.HTTPS);}

// Translation:
public GetIndustryInfoListRequest(): base("industry-brain", "2018-07-12", "GetIndustryInfoList"){Protocol = ProtocolType.HTTPS;}
// Original:
public AssociateTrialComponentResult associateTrialComponent(AssociateTrialComponentRequest request) {request = beforeClientExecution(request);return executeAssociateTrialComponent(request);}

// Translation:
public virtual AssociateTrialComponentResponse AssociateTrialComponent(AssociateTrialComponentRequest request){var options = new InvokeOptions();options.RequestMarshaller = AssociateTrialComponentRequestMarshaller.Instance;options.ResponseUnmarshaller = AssociateTrialComponentResponseUnmarshaller.Instance;return Invoke<AssociateTrialComponentResponse>(request, options);}
// Original:
public FileIdCluster addCluster(int dgId, int numShapedUsed) {return addCluster(dgId, numShapedUsed, true);}

// Translation:
public void AddCluster(int dgId, int numShapedUsed){AddCluster(dgId, numShapedUsed, true);}
// Original:
public GetFieldLevelEncryptionResult getFieldLevelEncryption(GetFieldLevelEncryptionRequest request) {request = beforeClientExecution(request);return executeGetFieldLevelEncryption(request);}

// Translation:
public virtual GetFieldLevelEncryptionResponse GetFieldLevelEncryption(GetFieldLevelEncryptionRequest request){var options = new InvokeOptions();options.RequestMarshaller = GetFieldLevelEncryptionRequestMarshaller.Instance;options.ResponseUnmarshaller = GetFieldLevelEncryptionResponseUnmarshaller.Instance;return Invoke<GetFieldLevelEncryptionResponse>(request, options);}
// Original:
public CharBuffer get(char[] dst, int dstOffset, int charCount) {Arrays.checkOffsetAndCount(dst.length, dstOffset, charCount);if (charCount > remaining()) {throw new BufferUnderflowException();}for (int i = dstOffset; i < dstOffset + charCount; ++i) {dst[i] = get();}return this;}

// Translation:
public virtual java.nio.CharBuffer get(char[] dst, int dstOffset, int charCount){java.util.Arrays.checkOffsetAndCount(dst.Length, dstOffset, charCount);if (charCount > remaining()){throw new java.nio.BufferUnderflowException();}{for (int i = dstOffset; i < dstOffset + charCount; ++i){dst[i] = get();}}return this;}
// Original:
public UpdateServiceResult updateService(UpdateServiceRequest request) {request = beforeClientExecution(request);return executeUpdateService(request);}

// Translation:
public virtual UpdateServiceResponse UpdateService(UpdateServiceRequest request){var options = new InvokeOptions();options.RequestMarshaller = UpdateServiceRequestMarshaller.Instance;options.ResponseUnmarshaller = UpdateServiceResponseUnmarshaller.Instance;return Invoke<UpdateServiceResponse>(request, options);}
// Original:
public FlushStageCacheResult flushStageCache(FlushStageCacheRequest request) {request = beforeClientExecution(request);return executeFlushStageCache(request);}

// Translation:
public virtual FlushStageCacheResponse FlushStageCache(FlushStageCacheRequest request){var options = new InvokeOptions();options.RequestMarshaller = FlushStageCacheRequestMarshaller.Instance;options.ResponseUnmarshaller = FlushStageCacheResponseUnmarshaller.Instance;return Invoke<FlushStageCacheResponse>(request, options);}
// Original:
public ModifyInstanceMetadataOptionsResult modifyInstanceMetadataOptions(ModifyInstanceMetadataOptionsRequest request) {request = beforeClientExecution(request);return executeModifyInstanceMetadataOptions(request);}

// Translation:
public virtual ModifyInstanceMetadataOptionsResponse ModifyInstanceMetadataOptions(ModifyInstanceMetadataOptionsRequest request){var options = new InvokeOptions();options.RequestMarshaller = ModifyInstanceMetadataOptionsRequestMarshaller.Instance;options.ResponseUnmarshaller = ModifyInstanceMetadataOptionsResponseUnmarshaller.Instance;return Invoke<ModifyInstanceMetadataOptionsResponse>(request, options);}
// Original:
public DefaultRowHeightRecord(RecordInputStream in) {field_1_option_flags = in.readShort();field_2_row_height   = in.readShort();}

// Translation:
public DefaultRowHeightRecord(RecordInputStream in1){field_1_option_flags = in1.ReadShort();field_2_row_height = in1.ReadShort();}
// Original:
public ListModelPackagesResult listModelPackages(ListModelPackagesRequest request) {request = beforeClientExecution(request);return executeListModelPackages(request);}

// Translation:
public virtual ListModelPackagesResponse ListModelPackages(ListModelPackagesRequest request){var options = new InvokeOptions();options.RequestMarshaller = ListModelPackagesRequestMarshaller.Instance;options.ResponseUnmarshaller = ListModelPackagesResponseUnmarshaller.Instance;return Invoke<ListModelPackagesResponse>(request, options);}
// Original:
public StopFleetActionsResult stopFleetActions(StopFleetActionsRequest request) {request = beforeClientExecution(request);return executeStopFleetActions(request);}

// Translation:
public virtual StopFleetActionsResponse StopFleetActions(StopFleetActionsRequest request){var options = new InvokeOptions();options.RequestMarshaller = StopFleetActionsRequestMarshaller.Instance;options.ResponseUnmarshaller = StopFleetActionsResponseUnmarshaller.Instance;return Invoke<StopFleetActionsResponse>(request, options);}
// Original:
public boolean matches(ValueEval x) {double testValue;if(x instanceof StringEval) {switch (getCode()) {case CmpOp.EQ:case CmpOp.NONE:break;case CmpOp.NE:return true;default:return false;}StringEval se = (StringEval)x;Double val = OperandResolver.parseDouble(se.getStringValue());if(val == null) {return false;}return _value == val.doubleValue();} else if((x instanceof NumberEval)) {NumberEval ne = (NumberEval) x;testValue = ne.getNumberValue();} else if((x instanceof BlankEval)) {switch (getCode()) {case CmpOp.NE:return true;default:return false;}} else {return false;}return evaluate(Double.compare(testValue, _value));}

// Translation:
public override bool Matches(ValueEval x){double testValue;if (x is StringEval){switch (Code){case CmpOp.EQ:case CmpOp.NONE:break;case CmpOp.NE:return true;default:return false;}StringEval se = (StringEval)x;Double val = OperandResolver.ParseDouble(se.StringValue);if (double.IsNaN(val)){return false;}return _value == val;}else if ((x is NumberEval)){NumberEval ne = (NumberEval)x;testValue = ne.NumberValue;}else if ((x is BlankEval)){switch (Code){case CmpOp.NE:return true;default:return false;}}else{return false;}return Evaluate(testValue.CompareTo(_value));}
// Original:
public boolean include(RevWalk walker, RevCommit c) {throw new UnsupportedOperationException(JGitText.get().cannotBeCombined);}

// Translation:
public override bool Include(RevWalk walker, RevCommit c){throw new NotSupportedException(JGitText.Get().cannotBeCombined);}
// Original:
public LongList(int capacity) {entries = new long[capacity];}

// Translation:
public LongList(int capacity){entries = new long[capacity];}
// Original:
public static String readAsciiLine(InputStream in) throws IOException {StringBuilder result = new StringBuilder(80);while (true) {int c = in.read();if (c == -1) {throw new EOFException();} else if (c == '\n') {break;}result.append((char) c);}int length = result.length();if (length > 0 && result.charAt(length - 1) == '\r') {result.setLength(length - 1);}return result.toString();}

// Translation:
public static string readAsciiLine(java.io.InputStream @in){java.lang.StringBuilder result = new java.lang.StringBuilder(80);while (true){int c = @in.read();if (c == -1){throw new java.io.EOFException();}else{if (c == '\n'){break;}}result.append((char)c);}int length = result.Length;if (length > 0 && result[length - 1] == '\r'){result.setLength(length - 1);}return result.ToString();}
// Original:
public DeleteRouteRequestParameterResult deleteRouteRequestParameter(DeleteRouteRequestParameterRequest request) {request = beforeClientExecution(request);return executeDeleteRouteRequestParameter(request);}

// Translation:
public virtual DeleteRouteRequestParameterResponse DeleteRouteRequestParameter(DeleteRouteRequestParameterRequest request){var options = new InvokeOptions();options.RequestMarshaller = DeleteRouteRequestParameterRequestMarshaller.Instance;options.ResponseUnmarshaller = DeleteRouteRequestParameterResponseUnmarshaller.Instance;return Invoke<DeleteRouteRequestParameterResponse>(request, options);}
// Original:
public int getRowCountForBlock(int block) {int startIndex = block * DBCellRecord.BLOCK_SIZE;int endIndex = startIndex + DBCellRecord.BLOCK_SIZE - 1;if (endIndex >= _rowRecords.size())endIndex = _rowRecords.size()-1;return endIndex-startIndex+1;}

// Translation:
public int GetRowCountForBlock(int block){int startIndex = block * DBCellRecord.BLOCK_SIZE;int endIndex = startIndex + DBCellRecord.BLOCK_SIZE - 1;if (endIndex >= _rowRecords.Count)endIndex = _rowRecords.Count - 1;return endIndex - startIndex + 1;}
// Original:
public boolean add(CharSequence text) {return map.put(text, PLACEHOLDER) == null;}

// Translation:
public virtual bool Add(ICharSequence text){return map.Put(text);}
// Original:
public FSTCompletion(FST<Object> automaton, boolean higherWeightsFirst, boolean exactFirst) {this.automaton = automaton;if (automaton != null) {this.rootArcs = cacheRootArcs(automaton);} else {this.rootArcs = new Arc[0];}this.higherWeightsFirst = higherWeightsFirst;this.exactFirst = exactFirst;}

// Translation:
public FSTCompletion(FST<object> automaton, bool higherWeightsFirst, bool exactFirst){this.automaton = automaton;if (automaton != null){this.rootArcs = CacheRootArcs(automaton);}else{this.rootArcs = new FST.Arc<object>[0];}this.higherWeightsFirst = higherWeightsFirst;this.exactFirst = exactFirst;}