code: private Object getConstantValue(FieldType type, byte[] block)
     {
        Object value;
        DataType dataType = type.getDataType();
  
        if (dataType == null)
        {
           value = null;
        }
        else
        {
           switch (dataType)
           {
              case DURATION:
              {
                 value = MPPUtility.getAdjustedDuration(m_properties, MPPUtility.getInt(block, getValueOffset()), MPPUtility.getDurationTimeUnits(MPPUtility.getShort(block, getTimeUnitsOffset())));
                 break;
              }
  
              case NUMERIC:
              {
                 value = Double.valueOf(MPPUtility.getDouble(block, getValueOffset()));
                 break;
              }
  
              case PERCENTAGE:
              {
                 value = Double.valueOf(MPPUtility.getShort(block, getValueOffset()));
                 break;
              }
  
              case CURRENCY:
              {
                 value = Double.valueOf(MPPUtility.getDouble(block, getValueOffset()) / 100);
                 break;
              }
  
              case STRING:
              {
                 int textOffset = getTextOffset(block);
                 value = MPPUtility.getUnicodeString(m_criteriaData, m_dataOffset + m_criteriaTextStart + textOffset);
                 break;
              }
  
              case BOOLEAN:
              {
                 int intValue = MPPUtility.getShort(block, getValueOffset());
                 value = (intValue == 1 ? Boolean.TRUE : Boolean.FALSE);
                 break;
              }
  
              case DATE:
              {
                 value = MPPUtility.getTimestamp(block, getValueOffset());
                 break;
              }
  
              default:
              {
                 value = null;
                 break;
              }
           }
        }
  
        return value;
     }
docs: Retrieves a constant value.
  
  @param type field type
  @param block criteria data block
  @return constant value