Uploaded image for project: 'QuickFIX/J'
  1. QuickFIX/J
  2. QFJ-428

FieldMap.setField(int key, Field<?> field) should be public

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Default
    • Resolution: Fixed
    • Affects Version/s: 1.4.0
    • Fix Version/s: 1.5.0
    • Component/s: Metadata/Specs
    • Labels:
      None

      Description

      Application that need to write data in FieldMap (Message, Groups) in a generic way need to have a public access to FieldMap.setField(int key, Field<?> field).

      FieldMap dest;
      final Field<?> field;

      This will allow writing :

      dest.setField(field.getField(), field);

      Instead of:

      if (field instanceof StringField)

      { dest.setField((StringField) field); }

      else if (field instanceof IntField)

      { dest.setField((IntField) field); }

      else if (field instanceof CharField)

      { dest.setField((CharField) field); }

      else if (field instanceof DecimalField)

      { dest.setField((DecimalField) field); }

      else if (field instanceof DoubleField)

      { dest.setField((DoubleField) field); }

      else if (field instanceof UtcDateOnlyField)

      { dest.setField((UtcDateOnlyField) field); }

      else if (field instanceof UtcTimeOnlyField)

      { dest.setField((UtcTimeOnlyField) field); }

      else if (field instanceof UtcTimeStampField)

      { dest.setField((UtcTimeStampField) field); }

      else if (field instanceof BooleanField)

      { dest.setField((BooleanField) field); }

      else

      { throw new RuntimeException("Unhandled field type: " + field.getClass()); }

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                phgiraud Paul-Henri Giraud
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: