Coverage Report - org.yaml.snakeyaml.scanner.SimpleKey
 
Classes in this File Line Coverage Branch Coverage Complexity
SimpleKey
100%
15/15
N/A
1
 
 1  
 /**
 2  
  * Copyright (c) 2008-2012, http://www.snakeyaml.org
 3  
  *
 4  
  * Licensed under the Apache License, Version 2.0 (the "License");
 5  
  * you may not use this file except in compliance with the License.
 6  
  * You may obtain a copy of the License at
 7  
  *
 8  
  *     http://www.apache.org/licenses/LICENSE-2.0
 9  
  *
 10  
  * Unless required by applicable law or agreed to in writing, software
 11  
  * distributed under the License is distributed on an "AS IS" BASIS,
 12  
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 13  
  * See the License for the specific language governing permissions and
 14  
  * limitations under the License.
 15  
  */
 16  
 package org.yaml.snakeyaml.scanner;
 17  
 
 18  
 import org.yaml.snakeyaml.error.Mark;
 19  
 
 20  
 /**
 21  
  * Simple keys treatment.
 22  
  * <p>
 23  
  * Helper class for {@link ScannerImpl}.
 24  
  * </p>
 25  
  * 
 26  
  * @see ScannerImpl
 27  
  */
 28  
 final class SimpleKey {
 29  
     private int tokenNumber;
 30  
     private boolean required;
 31  
     private int index;
 32  
     private int line;
 33  
     private int column;
 34  
     private Mark mark;
 35  
 
 36  376597
     public SimpleKey(int tokenNumber, boolean required, int index, int line, int column, Mark mark) {
 37  376597
         this.tokenNumber = tokenNumber;
 38  376597
         this.required = required;
 39  376597
         this.index = index;
 40  376597
         this.line = line;
 41  376597
         this.column = column;
 42  376597
         this.mark = mark;
 43  376597
     }
 44  
 
 45  
     public int getTokenNumber() {
 46  619531
         return this.tokenNumber;
 47  
     }
 48  
 
 49  
     public int getColumn() {
 50  135573
         return this.column;
 51  
     }
 52  
 
 53  
     public Mark getMark() {
 54  323200
         return mark;
 55  
     }
 56  
 
 57  
     public int getIndex() {
 58  751724
         return index;
 59  
     }
 60  
 
 61  
     public int getLine() {
 62  857526
         return line;
 63  
     }
 64  
 
 65  
     public boolean isRequired() {
 66  237532
         return required;
 67  
     }
 68  
 
 69  
     @Override
 70  
     public String toString() {
 71  1
         return "SimpleKey - tokenNumber=" + tokenNumber + " required=" + required + " index="
 72  
                 + index + " line=" + line + " column=" + column;
 73  
     }
 74  
 }