Ignore:
Timestamp:
09/23/13 18:54:07 (11 years ago)
Author:
psniegowski
Message:

HIGHLIGHTS:

  • add SimultorProviders? hierarchy
  • start Framsticks server over SSH
  • FJF compatible with Framsticks 4.0rc3
  • reading and writing of standard.expt
  • a proof-of-concept implementation of StandardExperiment?

CHANGELOG:
Optionally return FreeAccess? from registry.

Add SimulatorRange?.

StandardExperiment? with genotypes circulation.

Automate registration around StandardState?.

More improvements to StandardExperiment?.

Skeleton version of StandardExperiment?.

Test saving of StandardState?.

Standard experiment state is being loaded.

More development towards StandardState? reading.

Work on reading standard experiment state.

Add classes for standard experiment.

Update example standard.expt

Add FreeAccess? and FreeObject?.

Made compatible with version 4.0rc3

Change deserialization policy.

Improve SSH support.

Working running simulator over SSH.

Fix joining bug in Experiment.

Working version of SimulatorRunner?.

Add more SimulatorProviders?.

Working PrimeExperimentTest? with 4.0rc3

Add references to deserialization.

Add OpaqueObject? and it's serialization.

Add deserialization of dictionaries.

Partial implementation of deserialization.

Add more tests for deserialization.

Prepare tests for deserialization.

Add proper result to prime experiment test.

Minor fixes to simulators providers.

Draft version of SimulatorProvider?.

Add SimulatorProvider? interface.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • java/main/src/main/java/com/framsticks/params/PrimitiveParam.java

    r105 r107  
    33import com.framsticks.util.FramsticksException;
    44import com.framsticks.util.Misc;
    5 import com.framsticks.util.lang.Casting;
    65import com.framsticks.util.lang.Numbers;
    76import com.framsticks.util.lang.Strings;
     
    5150                                        return type.cast(value);
    5251                                }
    53                                 // if (Number.class.isAssignableFrom(type)) {
    5452                                return Numbers.parse((String) value, type);
    55                                 // }
    56                                 // return null;
     53                        } if ((value instanceof Integer) && (type.equals(Double.class))) {
     54                                return type.cast(new Double((Integer) value));
    5755                        } else {
    5856                                return type.cast(value);
    5957                        }
    6058                } catch (ClassCastException e) {
    61                         throw new FramsticksException().msg("failed to cast").cause(e).arg("param", this).arg("actual", value.getClass()).arg("requested", type);
     59                        throw new FramsticksException().msg("failed to cast").cause(e).arg("param", this).arg("actual", value.getClass()).arg("requested", type).arg("value", value);
    6260                }
    6361        }
     
    9997        }
    10098
    101         @Override
    10299        public <T> String serialize(T value) {
    103100                return Strings.toStringNullProof(value);
    104101        }
    105102
    106         @Override
    107         public <T> T deserialize(String text, T currentValue, Class<T> type) {
    108                 try {
    109                         return Casting.nullOrThrowCast(type, reassign(text, currentValue).getValue());
    110                 } catch (CastFailure e) {
    111                         return null;
    112                 }
    113         }
    114103}
Note: See TracChangeset for help on using the changeset viewer.