Fix #10 - improve use of type parameters instead of suppressing warnings

This commit is contained in:
Enrique Zamudio
2013-04-23 11:22:21 -05:00
parent 0221f8881a
commit cc5918dd50
15 changed files with 98 additions and 121 deletions
@@ -70,8 +70,8 @@ public abstract class FieldParseInfo {
* @param buf The full ISO message buffer.
* @param pos The starting position for the field data.
* @param custom A CustomField to decode the field. */
public abstract IsoValue<?> parse(final int field, byte[] buf, int pos,
CustomField<?> custom)
public abstract <T> IsoValue<?> parse(final int field, byte[] buf, int pos,
CustomField<T> custom)
throws ParseException, UnsupportedEncodingException;
/** Parses binary data from the buffer, creating and returning an IsoValue of the configured
@@ -80,8 +80,8 @@ public abstract class FieldParseInfo {
* @param buf The full ISO message buffer.
* @param pos The starting position for the field data.
* @param custom A CustomField to decode the field. */
public abstract IsoValue<?> parseBinary(final int field, byte[] buf, int pos,
CustomField<?> custom)
public abstract <T> IsoValue<?> parseBinary(final int field, byte[] buf, int pos,
CustomField<T> custom)
throws ParseException, UnsupportedEncodingException;
/** Returns a new FieldParseInfo instance that can parse the specified type. */