class ValueMetaBase implements IValueMeta {

  @Override
  public int hashCode( Object object ) throws HopValueException {
    int hash = 0;

    if ( isNull( object ) ) {
      switch ( getType() ) {
        case TYPE_BOOLEAN:
          hash ^= 1;
          break;
        case TYPE_DATE:
          hash ^= 2;
          break;
        case TYPE_NUMBER:
          hash ^= 4;
          break;
        case TYPE_STRING:
          hash ^= 8;
          break;
        case TYPE_INTEGER:
          hash ^= 16;
          break;
        case TYPE_BIGNUMBER:
          hash ^= 32;
          break;
        case TYPE_BINARY:
          hash ^= 64;
          break;
        case TYPE_TIMESTAMP:
          hash ^= 128;
          break;
        case TYPE_INET:
          hash ^= 256;
          break;
        case TYPE_NONE:
          break;
        default:
          break;
      }
    } else {
      switch ( getType() ) {
        case TYPE_BOOLEAN:
          hash ^= getBoolean( object ).hashCode();
          break;
        case TYPE_DATE:
          hash ^= getDate( object ).hashCode();
          break;
        case TYPE_INTEGER:
          hash ^= getInteger( object ).hashCode();
          break;
        case TYPE_NUMBER:
          hash ^= getNumber( object ).hashCode();
          break;
        case TYPE_STRING:
          hash ^= getString( object ).hashCode();
          break;
        case TYPE_BIGNUMBER:
          hash ^= getBigNumber( object ).hashCode();
          break;
        case TYPE_BINARY:
          hash ^= Arrays.hashCode( (byte[]) object );
          break;
        case TYPE_TIMESTAMP:
          hash ^= ( (Timestamp) object ).hashCode();
          break;
        case TYPE_INET:
          hash ^= ( (InetAddress) object ).hashCode();
          break;
        case TYPE_NONE:
          break;
        default:
          break;
      }
    }

    return hash;
  }

  public  ValueMetaBase();
  public  ValueMetaBase( String name );
  public  ValueMetaBase( String name, int type );
  public  ValueMetaBase( String name, int type, Comparator<Object> comparator );
  public  ValueMetaBase( String name, int type, int length, int precision );
  public  ValueMetaBase( String name, int type, int length, int precision, Comparator<Object> comparator );
  public  ValueMetaBase( Node node );
  @Deprecated public  ValueMetaBase( DataInputStream inputStream );

}