com.azalient.api.file
Interface RecordW

All Superinterfaces:
SortableData
All Known Subinterfaces:
IAgent, IArea, IAspect, IAttached, IBehaviour, ICentre, IChannel, IClippable, IColour, IController, ICourse, ICrossing, ICrossingTime, IDiscreteDistribution, IDistribution, IDistributionBar, IDivision, IDwell, IEngine, IEngineRecord, IFeature, IFixture, IFleet, IGroup, IIncident, IIntersection, ILabel, ILane, ILink, ILoop, ILoopMultiple, IMatrixDescription, IMob, IMotor, IMotorCalibration, IMotorFollowing, IMotorType, INetPoint, INode, IPassenger, IPastable, IPedestrianCalibration, IPerson, IPersonTrip, IPersonType, IPhase, IPhaseCrossing, IPlace, IPlaceIndex, IPlan, IPluginInfo, IProfile, IReportingOption, IRestriction, IRouteClass, IRouteClassBehaviour, IScenario, ISector, ISequence, IService, IShape, ISign, ISignalDisplay, ISignalRule, ISpeedControl, ISplit, IStand, IStream, ISymbol, ITag, ITerm, ITextSize, ITimedEvent, ITrail, ITransport, ITransportTrip, ITransportType, ITrip, ITurn, IType, ITypeSet, IVehicle, IVehicleTrip, IVehicleType, IView, IVolume, IWalkway, IZone, RecordRW, RecordV, StoreRecordRW
All Known Implementing Classes:
AbstractRecordRW, AbstractRecordW, AbstractStoreRecordFixedName, AbstractStoreRecordIndirectName, AbstractStoreRecordRenamable, AbstractStoreRecordRenamableNumeric

public interface RecordW
extends SortableData

If an object implements this interface it can be written to the model data file, as a record in a table. The file writing methods GET the data from the object using the methods in this interface, and save that data to the model file. Some records that are written to a file, but never read back, such as some types of results, implement this interface and not RecordR


Method Summary
 Object[] extraCols()
          Return an array of extra columns for this record.
 Object extraGet(Object columnName)
          The (API) user can store additional information in any record using "Extra" fields.
 boolean extraGetB(Object col)
          Get the data in the named extra column, as a boolean
 double extraGetD(Object col)
          Get the data in the named extra column, as a double
 int extraGetI(Object col)
          Get the data in the named extra column, as an integer
 String extraGetS(Object col)
          Get the data in the named extra column, as a String
 UTime extraGetT(Object col)
          Get the data in the named extra column, as a UTime Object
 Object get(Object col)
          The writer calls this to get the data in the record.
 boolean isVolatile()
          If true, do not save the record
 

Method Detail

get

Object get(Object col)
The writer calls this to get the data in the record.

Specified by:
get in interface SortableData
Parameters:
col - The column header key (normally a String)
Returns:
an object having one of the following types:
  • String
  • Double / Float
  • Integer / Long
  • Boolean
  • UTime

OR

an object of any other type - converted to a String using the toString() method

OR

the data may be an array of uniform type. An array of objects is expected if the key-string ends in "*". (This is a convention, not enforced).

isVolatile

boolean isVolatile()
If true, do not save the record


extraCols

Object[] extraCols()
Return an array of extra columns for this record. Returning null or an empty array means there is are no extra columns


extraGet

Object extraGet(Object columnName)
The (API) user can store additional information in any record using "Extra" fields. There is no limit to the number of Extra fields, the only constraint is that the field name must be unique. Normally, the columnName passed in is a String, but any other type of object can be used. This method returns the data as one of the types described in the get method()

See Also:
get(Object), RecordR.extraSet(Object, Object)

extraGetD

double extraGetD(Object col)
Get the data in the named extra column, as a double

See Also:
extraGet(Object)

extraGetB

boolean extraGetB(Object col)
Get the data in the named extra column, as a boolean

See Also:
extraGet(Object)

extraGetI

int extraGetI(Object col)
Get the data in the named extra column, as an integer

See Also:
extraGet(Object)

extraGetS

String extraGetS(Object col)
Get the data in the named extra column, as a String

See Also:
extraGet(Object)

extraGetT

UTime extraGetT(Object col)
Get the data in the named extra column, as a UTime Object

See Also:
extraGet(Object)