コード例 #1
0
  private BCF2FieldEncoder(
      final VCFCompoundHeaderLine headerLine,
      final Map<String, Integer> dict,
      final BCF2Type staticType) {
    this.headerLine = headerLine;
    this.staticType = staticType;

    final Integer offset = dict.get(getField());
    if (offset == null)
      throw new IllegalStateException(
          "Format error: could not find string " + getField() + " in header as required by BCF");
    this.dictionaryOffset = offset;
    dictionaryOffsetType = BCF2Utils.determineIntegerType(offset);
  }
コード例 #2
0
 @Override
 public BCF2Type getDynamicType(final Object value) {
   return value == null
       ? BCF2Type.INT8
       : BCF2Utils.determineIntegerType(BCF2Utils.toList(Integer.class, value));
 }
コード例 #3
0
 @Override
 public BCF2Type getDynamicType(final Object value) {
   return value == null ? BCF2Type.INT8 : BCF2Utils.determineIntegerType((Integer) value);
 }