All Downloads are FREE. Search and download functionalities are using the official Maven repository.

avro.org.apache.parquet.avro.StringBehaviorTest Maven / Gradle / Ivy

The newest version!
/**
 * Autogenerated by Avro
 *
 * DO NOT EDIT DIRECTLY
 */
package org.apache.parquet.avro;

import org.apache.avro.generic.GenericArray;
import org.apache.avro.specific.SpecificData;
import org.apache.avro.util.Utf8;
import org.apache.avro.message.BinaryMessageEncoder;
import org.apache.avro.message.BinaryMessageDecoder;
import org.apache.avro.message.SchemaStore;

@org.apache.avro.specific.AvroGenerated
public class StringBehaviorTest extends org.apache.avro.specific.SpecificRecordBase implements org.apache.avro.specific.SpecificRecord {
  private static final long serialVersionUID = 415070539232112318L;


  public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse("{\"type\":\"record\",\"name\":\"StringBehaviorTest\",\"namespace\":\"org.apache.parquet.avro\",\"fields\":[{\"name\":\"default_class\",\"type\":\"string\"},{\"name\":\"string_class\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"stringable_class\",\"type\":{\"type\":\"string\",\"java-class\":\"java.math.BigDecimal\"}},{\"name\":\"default_map\",\"type\":{\"type\":\"map\",\"values\":\"int\"}},{\"name\":\"string_map\",\"type\":{\"type\":\"map\",\"values\":\"int\",\"avro.java.string\":\"String\"}},{\"name\":\"stringable_map\",\"type\":{\"type\":\"map\",\"values\":\"int\",\"java-key-class\":\"java.math.BigDecimal\"}}]}");
  public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; }

  private static final SpecificData MODEL$ = new SpecificData();

  private static final BinaryMessageEncoder ENCODER =
      new BinaryMessageEncoder<>(MODEL$, SCHEMA$);

  private static final BinaryMessageDecoder DECODER =
      new BinaryMessageDecoder<>(MODEL$, SCHEMA$);

  /**
   * Return the BinaryMessageEncoder instance used by this class.
   * @return the message encoder used by this class
   */
  public static BinaryMessageEncoder getEncoder() {
    return ENCODER;
  }

  /**
   * Return the BinaryMessageDecoder instance used by this class.
   * @return the message decoder used by this class
   */
  public static BinaryMessageDecoder getDecoder() {
    return DECODER;
  }

  /**
   * Create a new BinaryMessageDecoder instance for this class that uses the specified {@link SchemaStore}.
   * @param resolver a {@link SchemaStore} used to find schemas by fingerprint
   * @return a BinaryMessageDecoder instance for this class backed by the given SchemaStore
   */
  public static BinaryMessageDecoder createDecoder(SchemaStore resolver) {
    return new BinaryMessageDecoder<>(MODEL$, SCHEMA$, resolver);
  }

  /**
   * Serializes this StringBehaviorTest to a ByteBuffer.
   * @return a buffer holding the serialized data for this instance
   * @throws java.io.IOException if this instance could not be serialized
   */
  public java.nio.ByteBuffer toByteBuffer() throws java.io.IOException {
    return ENCODER.encode(this);
  }

  /**
   * Deserializes a StringBehaviorTest from a ByteBuffer.
   * @param b a byte buffer holding serialized data for an instance of this class
   * @return a StringBehaviorTest instance decoded from the given buffer
   * @throws java.io.IOException if the given bytes could not be deserialized into an instance of this class
   */
  public static StringBehaviorTest fromByteBuffer(
      java.nio.ByteBuffer b) throws java.io.IOException {
    return DECODER.decode(b);
  }

  private java.lang.CharSequence default_class;
  private java.lang.CharSequence string_class;
  private java.math.BigDecimal stringable_class;
  private java.util.Map default_map;
  private java.util.Map string_map;
  private java.util.Map stringable_map;

  /**
   * Default constructor.  Note that this does not initialize fields
   * to their default values from the schema.  If that is desired then
   * one should use newBuilder().
   */
  public StringBehaviorTest() {}

  /**
   * All-args constructor.
   * @param default_class The new value for default_class
   * @param string_class The new value for string_class
   * @param stringable_class The new value for stringable_class
   * @param default_map The new value for default_map
   * @param string_map The new value for string_map
   * @param stringable_map The new value for stringable_map
   */
  public StringBehaviorTest(java.lang.CharSequence default_class, java.lang.CharSequence string_class, java.math.BigDecimal stringable_class, java.util.Map default_map, java.util.Map string_map, java.util.Map stringable_map) {
    this.default_class = default_class;
    this.string_class = string_class;
    this.stringable_class = stringable_class;
    this.default_map = default_map;
    this.string_map = string_map;
    this.stringable_map = stringable_map;
  }

  @Override
  public org.apache.avro.specific.SpecificData getSpecificData() { return MODEL$; }

  @Override
  public org.apache.avro.Schema getSchema() { return SCHEMA$; }

  // Used by DatumWriter.  Applications should not call.
  @Override
  public java.lang.Object get(int field$) {
    switch (field$) {
    case 0: return default_class;
    case 1: return string_class;
    case 2: return stringable_class;
    case 3: return default_map;
    case 4: return string_map;
    case 5: return stringable_map;
    default: throw new IndexOutOfBoundsException("Invalid index: " + field$);
    }
  }

  // Used by DatumReader.  Applications should not call.
  @Override
  @SuppressWarnings(value="unchecked")
  public void put(int field$, java.lang.Object value$) {
    switch (field$) {
    case 0: default_class = (java.lang.CharSequence)value$; break;
    case 1: string_class = (java.lang.CharSequence)value$; break;
    case 2: stringable_class = (java.math.BigDecimal)value$; break;
    case 3: default_map = (java.util.Map)value$; break;
    case 4: string_map = (java.util.Map)value$; break;
    case 5: stringable_map = (java.util.Map)value$; break;
    default: throw new IndexOutOfBoundsException("Invalid index: " + field$);
    }
  }

  /**
   * Gets the value of the 'default_class' field.
   * @return The value of the 'default_class' field.
   */
  public java.lang.CharSequence getDefaultClass() {
    return default_class;
  }


  /**
   * Sets the value of the 'default_class' field.
   * @param value the value to set.
   */
  public void setDefaultClass(java.lang.CharSequence value) {
    this.default_class = value;
  }

  /**
   * Gets the value of the 'string_class' field.
   * @return The value of the 'string_class' field.
   */
  public java.lang.CharSequence getStringClass() {
    return string_class;
  }


  /**
   * Sets the value of the 'string_class' field.
   * @param value the value to set.
   */
  public void setStringClass(java.lang.CharSequence value) {
    this.string_class = value;
  }

  /**
   * Gets the value of the 'stringable_class' field.
   * @return The value of the 'stringable_class' field.
   */
  public java.math.BigDecimal getStringableClass() {
    return stringable_class;
  }


  /**
   * Sets the value of the 'stringable_class' field.
   * @param value the value to set.
   */
  public void setStringableClass(java.math.BigDecimal value) {
    this.stringable_class = value;
  }

  /**
   * Gets the value of the 'default_map' field.
   * @return The value of the 'default_map' field.
   */
  public java.util.Map getDefaultMap() {
    return default_map;
  }


  /**
   * Sets the value of the 'default_map' field.
   * @param value the value to set.
   */
  public void setDefaultMap(java.util.Map value) {
    this.default_map = value;
  }

  /**
   * Gets the value of the 'string_map' field.
   * @return The value of the 'string_map' field.
   */
  public java.util.Map getStringMap() {
    return string_map;
  }


  /**
   * Sets the value of the 'string_map' field.
   * @param value the value to set.
   */
  public void setStringMap(java.util.Map value) {
    this.string_map = value;
  }

  /**
   * Gets the value of the 'stringable_map' field.
   * @return The value of the 'stringable_map' field.
   */
  public java.util.Map getStringableMap() {
    return stringable_map;
  }


  /**
   * Sets the value of the 'stringable_map' field.
   * @param value the value to set.
   */
  public void setStringableMap(java.util.Map value) {
    this.stringable_map = value;
  }

  /**
   * Creates a new StringBehaviorTest RecordBuilder.
   * @return A new StringBehaviorTest RecordBuilder
   */
  public static org.apache.parquet.avro.StringBehaviorTest.Builder newBuilder() {
    return new org.apache.parquet.avro.StringBehaviorTest.Builder();
  }

  /**
   * Creates a new StringBehaviorTest RecordBuilder by copying an existing Builder.
   * @param other The existing builder to copy.
   * @return A new StringBehaviorTest RecordBuilder
   */
  public static org.apache.parquet.avro.StringBehaviorTest.Builder newBuilder(org.apache.parquet.avro.StringBehaviorTest.Builder other) {
    if (other == null) {
      return new org.apache.parquet.avro.StringBehaviorTest.Builder();
    } else {
      return new org.apache.parquet.avro.StringBehaviorTest.Builder(other);
    }
  }

  /**
   * Creates a new StringBehaviorTest RecordBuilder by copying an existing StringBehaviorTest instance.
   * @param other The existing instance to copy.
   * @return A new StringBehaviorTest RecordBuilder
   */
  public static org.apache.parquet.avro.StringBehaviorTest.Builder newBuilder(org.apache.parquet.avro.StringBehaviorTest other) {
    if (other == null) {
      return new org.apache.parquet.avro.StringBehaviorTest.Builder();
    } else {
      return new org.apache.parquet.avro.StringBehaviorTest.Builder(other);
    }
  }

  /**
   * RecordBuilder for StringBehaviorTest instances.
   */
  @org.apache.avro.specific.AvroGenerated
  public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase
    implements org.apache.avro.data.RecordBuilder {

    private java.lang.CharSequence default_class;
    private java.lang.CharSequence string_class;
    private java.math.BigDecimal stringable_class;
    private java.util.Map default_map;
    private java.util.Map string_map;
    private java.util.Map stringable_map;

    /** Creates a new Builder */
    private Builder() {
      super(SCHEMA$, MODEL$);
    }

    /**
     * Creates a Builder by copying an existing Builder.
     * @param other The existing Builder to copy.
     */
    private Builder(org.apache.parquet.avro.StringBehaviorTest.Builder other) {
      super(other);
      if (isValidValue(fields()[0], other.default_class)) {
        this.default_class = data().deepCopy(fields()[0].schema(), other.default_class);
        fieldSetFlags()[0] = other.fieldSetFlags()[0];
      }
      if (isValidValue(fields()[1], other.string_class)) {
        this.string_class = data().deepCopy(fields()[1].schema(), other.string_class);
        fieldSetFlags()[1] = other.fieldSetFlags()[1];
      }
      if (isValidValue(fields()[2], other.stringable_class)) {
        this.stringable_class = data().deepCopy(fields()[2].schema(), other.stringable_class);
        fieldSetFlags()[2] = other.fieldSetFlags()[2];
      }
      if (isValidValue(fields()[3], other.default_map)) {
        this.default_map = data().deepCopy(fields()[3].schema(), other.default_map);
        fieldSetFlags()[3] = other.fieldSetFlags()[3];
      }
      if (isValidValue(fields()[4], other.string_map)) {
        this.string_map = data().deepCopy(fields()[4].schema(), other.string_map);
        fieldSetFlags()[4] = other.fieldSetFlags()[4];
      }
      if (isValidValue(fields()[5], other.stringable_map)) {
        this.stringable_map = data().deepCopy(fields()[5].schema(), other.stringable_map);
        fieldSetFlags()[5] = other.fieldSetFlags()[5];
      }
    }

    /**
     * Creates a Builder by copying an existing StringBehaviorTest instance
     * @param other The existing instance to copy.
     */
    private Builder(org.apache.parquet.avro.StringBehaviorTest other) {
      super(SCHEMA$, MODEL$);
      if (isValidValue(fields()[0], other.default_class)) {
        this.default_class = data().deepCopy(fields()[0].schema(), other.default_class);
        fieldSetFlags()[0] = true;
      }
      if (isValidValue(fields()[1], other.string_class)) {
        this.string_class = data().deepCopy(fields()[1].schema(), other.string_class);
        fieldSetFlags()[1] = true;
      }
      if (isValidValue(fields()[2], other.stringable_class)) {
        this.stringable_class = data().deepCopy(fields()[2].schema(), other.stringable_class);
        fieldSetFlags()[2] = true;
      }
      if (isValidValue(fields()[3], other.default_map)) {
        this.default_map = data().deepCopy(fields()[3].schema(), other.default_map);
        fieldSetFlags()[3] = true;
      }
      if (isValidValue(fields()[4], other.string_map)) {
        this.string_map = data().deepCopy(fields()[4].schema(), other.string_map);
        fieldSetFlags()[4] = true;
      }
      if (isValidValue(fields()[5], other.stringable_map)) {
        this.stringable_map = data().deepCopy(fields()[5].schema(), other.stringable_map);
        fieldSetFlags()[5] = true;
      }
    }

    /**
      * Gets the value of the 'default_class' field.
      * @return The value.
      */
    public java.lang.CharSequence getDefaultClass() {
      return default_class;
    }


    /**
      * Sets the value of the 'default_class' field.
      * @param value The value of 'default_class'.
      * @return This builder.
      */
    public org.apache.parquet.avro.StringBehaviorTest.Builder setDefaultClass(java.lang.CharSequence value) {
      validate(fields()[0], value);
      this.default_class = value;
      fieldSetFlags()[0] = true;
      return this;
    }

    /**
      * Checks whether the 'default_class' field has been set.
      * @return True if the 'default_class' field has been set, false otherwise.
      */
    public boolean hasDefaultClass() {
      return fieldSetFlags()[0];
    }


    /**
      * Clears the value of the 'default_class' field.
      * @return This builder.
      */
    public org.apache.parquet.avro.StringBehaviorTest.Builder clearDefaultClass() {
      default_class = null;
      fieldSetFlags()[0] = false;
      return this;
    }

    /**
      * Gets the value of the 'string_class' field.
      * @return The value.
      */
    public java.lang.CharSequence getStringClass() {
      return string_class;
    }


    /**
      * Sets the value of the 'string_class' field.
      * @param value The value of 'string_class'.
      * @return This builder.
      */
    public org.apache.parquet.avro.StringBehaviorTest.Builder setStringClass(java.lang.CharSequence value) {
      validate(fields()[1], value);
      this.string_class = value;
      fieldSetFlags()[1] = true;
      return this;
    }

    /**
      * Checks whether the 'string_class' field has been set.
      * @return True if the 'string_class' field has been set, false otherwise.
      */
    public boolean hasStringClass() {
      return fieldSetFlags()[1];
    }


    /**
      * Clears the value of the 'string_class' field.
      * @return This builder.
      */
    public org.apache.parquet.avro.StringBehaviorTest.Builder clearStringClass() {
      string_class = null;
      fieldSetFlags()[1] = false;
      return this;
    }

    /**
      * Gets the value of the 'stringable_class' field.
      * @return The value.
      */
    public java.math.BigDecimal getStringableClass() {
      return stringable_class;
    }


    /**
      * Sets the value of the 'stringable_class' field.
      * @param value The value of 'stringable_class'.
      * @return This builder.
      */
    public org.apache.parquet.avro.StringBehaviorTest.Builder setStringableClass(java.math.BigDecimal value) {
      validate(fields()[2], value);
      this.stringable_class = value;
      fieldSetFlags()[2] = true;
      return this;
    }

    /**
      * Checks whether the 'stringable_class' field has been set.
      * @return True if the 'stringable_class' field has been set, false otherwise.
      */
    public boolean hasStringableClass() {
      return fieldSetFlags()[2];
    }


    /**
      * Clears the value of the 'stringable_class' field.
      * @return This builder.
      */
    public org.apache.parquet.avro.StringBehaviorTest.Builder clearStringableClass() {
      stringable_class = null;
      fieldSetFlags()[2] = false;
      return this;
    }

    /**
      * Gets the value of the 'default_map' field.
      * @return The value.
      */
    public java.util.Map getDefaultMap() {
      return default_map;
    }


    /**
      * Sets the value of the 'default_map' field.
      * @param value The value of 'default_map'.
      * @return This builder.
      */
    public org.apache.parquet.avro.StringBehaviorTest.Builder setDefaultMap(java.util.Map value) {
      validate(fields()[3], value);
      this.default_map = value;
      fieldSetFlags()[3] = true;
      return this;
    }

    /**
      * Checks whether the 'default_map' field has been set.
      * @return True if the 'default_map' field has been set, false otherwise.
      */
    public boolean hasDefaultMap() {
      return fieldSetFlags()[3];
    }


    /**
      * Clears the value of the 'default_map' field.
      * @return This builder.
      */
    public org.apache.parquet.avro.StringBehaviorTest.Builder clearDefaultMap() {
      default_map = null;
      fieldSetFlags()[3] = false;
      return this;
    }

    /**
      * Gets the value of the 'string_map' field.
      * @return The value.
      */
    public java.util.Map getStringMap() {
      return string_map;
    }


    /**
      * Sets the value of the 'string_map' field.
      * @param value The value of 'string_map'.
      * @return This builder.
      */
    public org.apache.parquet.avro.StringBehaviorTest.Builder setStringMap(java.util.Map value) {
      validate(fields()[4], value);
      this.string_map = value;
      fieldSetFlags()[4] = true;
      return this;
    }

    /**
      * Checks whether the 'string_map' field has been set.
      * @return True if the 'string_map' field has been set, false otherwise.
      */
    public boolean hasStringMap() {
      return fieldSetFlags()[4];
    }


    /**
      * Clears the value of the 'string_map' field.
      * @return This builder.
      */
    public org.apache.parquet.avro.StringBehaviorTest.Builder clearStringMap() {
      string_map = null;
      fieldSetFlags()[4] = false;
      return this;
    }

    /**
      * Gets the value of the 'stringable_map' field.
      * @return The value.
      */
    public java.util.Map getStringableMap() {
      return stringable_map;
    }


    /**
      * Sets the value of the 'stringable_map' field.
      * @param value The value of 'stringable_map'.
      * @return This builder.
      */
    public org.apache.parquet.avro.StringBehaviorTest.Builder setStringableMap(java.util.Map value) {
      validate(fields()[5], value);
      this.stringable_map = value;
      fieldSetFlags()[5] = true;
      return this;
    }

    /**
      * Checks whether the 'stringable_map' field has been set.
      * @return True if the 'stringable_map' field has been set, false otherwise.
      */
    public boolean hasStringableMap() {
      return fieldSetFlags()[5];
    }


    /**
      * Clears the value of the 'stringable_map' field.
      * @return This builder.
      */
    public org.apache.parquet.avro.StringBehaviorTest.Builder clearStringableMap() {
      stringable_map = null;
      fieldSetFlags()[5] = false;
      return this;
    }

    @Override
    @SuppressWarnings("unchecked")
    public StringBehaviorTest build() {
      try {
        StringBehaviorTest record = new StringBehaviorTest();
        record.default_class = fieldSetFlags()[0] ? this.default_class : (java.lang.CharSequence) defaultValue(fields()[0]);
        record.string_class = fieldSetFlags()[1] ? this.string_class : (java.lang.CharSequence) defaultValue(fields()[1]);
        record.stringable_class = fieldSetFlags()[2] ? this.stringable_class : (java.math.BigDecimal) defaultValue(fields()[2]);
        record.default_map = fieldSetFlags()[3] ? this.default_map : (java.util.Map) defaultValue(fields()[3]);
        record.string_map = fieldSetFlags()[4] ? this.string_map : (java.util.Map) defaultValue(fields()[4]);
        record.stringable_map = fieldSetFlags()[5] ? this.stringable_map : (java.util.Map) defaultValue(fields()[5]);
        return record;
      } catch (org.apache.avro.AvroMissingFieldException e) {
        throw e;
      } catch (java.lang.Exception e) {
        throw new org.apache.avro.AvroRuntimeException(e);
      }
    }
  }

  @SuppressWarnings("unchecked")
  private static final org.apache.avro.io.DatumWriter
    WRITER$ = (org.apache.avro.io.DatumWriter)MODEL$.createDatumWriter(SCHEMA$);

  @Override public void writeExternal(java.io.ObjectOutput out)
    throws java.io.IOException {
    WRITER$.write(this, SpecificData.getEncoder(out));
  }

  @SuppressWarnings("unchecked")
  private static final org.apache.avro.io.DatumReader
    READER$ = (org.apache.avro.io.DatumReader)MODEL$.createDatumReader(SCHEMA$);

  @Override public void readExternal(java.io.ObjectInput in)
    throws java.io.IOException {
    READER$.read(this, SpecificData.getDecoder(in));
  }

  @Override protected boolean hasCustomCoders() { return true; }

  @Override public void customEncode(org.apache.avro.io.Encoder out)
    throws java.io.IOException
  {
    out.writeString(this.default_class);

    out.writeString(this.string_class);

    out.writeString(this.stringable_class.toString());

    long size0 = this.default_map.size();
    out.writeMapStart();
    out.setItemCount(size0);
    long actualSize0 = 0;
    for (java.util.Map.Entry e0: this.default_map.entrySet()) {
      actualSize0++;
      out.startItem();
      out.writeString(e0.getKey());
      java.lang.Integer v0 = e0.getValue();
      out.writeInt(v0);
    }
    out.writeMapEnd();
    if (actualSize0 != size0)
      throw new java.util.ConcurrentModificationException("Map-size written was " + size0 + ", but element count was " + actualSize0 + ".");

    long size1 = this.string_map.size();
    out.writeMapStart();
    out.setItemCount(size1);
    long actualSize1 = 0;
    for (java.util.Map.Entry e1: this.string_map.entrySet()) {
      actualSize1++;
      out.startItem();
      out.writeString(e1.getKey());
      java.lang.Integer v1 = e1.getValue();
      out.writeInt(v1);
    }
    out.writeMapEnd();
    if (actualSize1 != size1)
      throw new java.util.ConcurrentModificationException("Map-size written was " + size1 + ", but element count was " + actualSize1 + ".");

    long size2 = this.stringable_map.size();
    out.writeMapStart();
    out.setItemCount(size2);
    long actualSize2 = 0;
    for (java.util.Map.Entry e2: this.stringable_map.entrySet()) {
      actualSize2++;
      out.startItem();
      out.writeString(e2.getKey().toString());
      java.lang.Integer v2 = e2.getValue();
      out.writeInt(v2);
    }
    out.writeMapEnd();
    if (actualSize2 != size2)
      throw new java.util.ConcurrentModificationException("Map-size written was " + size2 + ", but element count was " + actualSize2 + ".");

  }

  @Override public void customDecode(org.apache.avro.io.ResolvingDecoder in)
    throws java.io.IOException
  {
    org.apache.avro.Schema.Field[] fieldOrder = in.readFieldOrderIfDiff();
    if (fieldOrder == null) {
      this.default_class = in.readString(this.default_class instanceof Utf8 ? (Utf8)this.default_class : null);

      this.string_class = in.readString(this.string_class instanceof Utf8 ? (Utf8)this.string_class : null);

      this.stringable_class = new java.math.BigDecimal(in.readString());

      long size0 = in.readMapStart();
      java.util.Map m0 = this.default_map; // Need fresh name due to limitation of macro system
      if (m0 == null) {
        m0 = new java.util.HashMap((int)size0);
        this.default_map = m0;
      } else m0.clear();
      for ( ; 0 < size0; size0 = in.mapNext()) {
        for ( ; size0 != 0; size0--) {
          java.lang.CharSequence k0 = null;
          k0 = in.readString(k0 instanceof Utf8 ? (Utf8)k0 : null);
          java.lang.Integer v0 = null;
          v0 = in.readInt();
          m0.put(k0, v0);
        }
      }

      long size1 = in.readMapStart();
      java.util.Map m1 = this.string_map; // Need fresh name due to limitation of macro system
      if (m1 == null) {
        m1 = new java.util.HashMap((int)size1);
        this.string_map = m1;
      } else m1.clear();
      for ( ; 0 < size1; size1 = in.mapNext()) {
        for ( ; size1 != 0; size1--) {
          java.lang.CharSequence k1 = null;
          k1 = in.readString(k1 instanceof Utf8 ? (Utf8)k1 : null);
          java.lang.Integer v1 = null;
          v1 = in.readInt();
          m1.put(k1, v1);
        }
      }

      long size2 = in.readMapStart();
      java.util.Map m2 = this.stringable_map; // Need fresh name due to limitation of macro system
      if (m2 == null) {
        m2 = new java.util.HashMap((int)size2);
        this.stringable_map = m2;
      } else m2.clear();
      for ( ; 0 < size2; size2 = in.mapNext()) {
        for ( ; size2 != 0; size2--) {
          java.math.BigDecimal k2 = null;
          k2 = new java.math.BigDecimal(in.readString());
          java.lang.Integer v2 = null;
          v2 = in.readInt();
          m2.put(k2, v2);
        }
      }

    } else {
      for (int i = 0; i < 6; i++) {
        switch (fieldOrder[i].pos()) {
        case 0:
          this.default_class = in.readString(this.default_class instanceof Utf8 ? (Utf8)this.default_class : null);
          break;

        case 1:
          this.string_class = in.readString(this.string_class instanceof Utf8 ? (Utf8)this.string_class : null);
          break;

        case 2:
          this.stringable_class = new java.math.BigDecimal(in.readString());
          break;

        case 3:
          long size0 = in.readMapStart();
          java.util.Map m0 = this.default_map; // Need fresh name due to limitation of macro system
          if (m0 == null) {
            m0 = new java.util.HashMap((int)size0);
            this.default_map = m0;
          } else m0.clear();
          for ( ; 0 < size0; size0 = in.mapNext()) {
            for ( ; size0 != 0; size0--) {
              java.lang.CharSequence k0 = null;
              k0 = in.readString(k0 instanceof Utf8 ? (Utf8)k0 : null);
              java.lang.Integer v0 = null;
              v0 = in.readInt();
              m0.put(k0, v0);
            }
          }
          break;

        case 4:
          long size1 = in.readMapStart();
          java.util.Map m1 = this.string_map; // Need fresh name due to limitation of macro system
          if (m1 == null) {
            m1 = new java.util.HashMap((int)size1);
            this.string_map = m1;
          } else m1.clear();
          for ( ; 0 < size1; size1 = in.mapNext()) {
            for ( ; size1 != 0; size1--) {
              java.lang.CharSequence k1 = null;
              k1 = in.readString(k1 instanceof Utf8 ? (Utf8)k1 : null);
              java.lang.Integer v1 = null;
              v1 = in.readInt();
              m1.put(k1, v1);
            }
          }
          break;

        case 5:
          long size2 = in.readMapStart();
          java.util.Map m2 = this.stringable_map; // Need fresh name due to limitation of macro system
          if (m2 == null) {
            m2 = new java.util.HashMap((int)size2);
            this.stringable_map = m2;
          } else m2.clear();
          for ( ; 0 < size2; size2 = in.mapNext()) {
            for ( ; size2 != 0; size2--) {
              java.math.BigDecimal k2 = null;
              k2 = new java.math.BigDecimal(in.readString());
              java.lang.Integer v2 = null;
              v2 = in.readInt();
              m2.put(k2, v2);
            }
          }
          break;

        default:
          throw new java.io.IOException("Corrupt ResolvingDecoder.");
        }
      }
    }
  }
}














© 2015 - 2025 Weber Informatics LLC | Privacy Policy