org.fudgemsg
Interface FudgeField

All Known Implementing Classes:
FudgeMsgField

public interface FudgeField

A single field in the Fudge system.

Each Fudge message consists of a list of fields. Each field consists of a Fudge type and value, with an optional name and ordinal. All four combinations of name and ordinal are possible - from both present to both absent.

The type of the value should match the stored Fudge type: getType().getJavaType().isAssignableFrom(getValue().getClass()) should be true.

Applications are recommended to use this interface rather than a concrete class.

This interface makes no guarantees about the mutability or thread-safety of implementations.


Method Summary
 String getName()
          Gets the optional field name.
 Short getOrdinal()
          Gets the optional field ordinal.
 FudgeFieldType<?> getType()
          Gets the Fudge type of the value.
 Object getValue()
          Gets the field value.
 

Method Detail

getType

FudgeFieldType<?> getType()
Gets the Fudge type of the value.

The type should match the value.

Returns:
the Fudge field type, not null

getValue

Object getValue()
Gets the field value.

The value is the payload of the field.

Returns:
the field value, may be null

getOrdinal

Short getOrdinal()
Gets the optional field ordinal.

The ordinal is a number that identifies the meaning of the data. It is typically a reference into the taxonomy.

Returns:
the field ordinal, null if the field has no ordinal

getName

String getName()
Gets the optional field name.

The name is a string that identifies the meaning of the data. This is similar to the tag name in XML.

Returns:
the field name, null if the field has no name


Copyright 2009-Present by OpenGamma Inc. and individual contributors
Released under the Apache License, Version 2.0