@Override public void sendFullStatus(Train train) throws IOException {
  ArrayList<Attribute> status=new ArrayList<Attribute>();
  if (train != null) {
    status.add(new Attribute(TRAIN,train.getName()));
    status.add(new Attribute(TRAINLOCATION,train.getCurrentLocationName()));
    status.add(new Attribute(TRAINLENGTH,String.valueOf(train.getTrainLength())));
    status.add(new Attribute(TRAINWEIGHT,String.valueOf(train.getTrainWeight())));
    status.add(new Attribute(TRAINCARS,String.valueOf(train.getNumberCarsInTrain())));
    status.add(new Attribute(TRAINLEADLOCO,constructTrainLeadLoco(train.getName())));
    status.add(new Attribute(TRAINCABOOSE,constructTrainCaboose(train.getName())));
    sendMessage(status);
  }
}

@ Override public void sendFullStatus ( Train train ) throws IOException { ArrayList < Attribute > status = new ArrayList < Attribute > ( ) ; if ( train != null ) { status . add ( new Attribute ( TRAIN , train . getName ( ) ) ) ; status . add ( new Attribute ( TRAINLOCATION , train . getCurrentLocationName ( ) ) ) ; status . add ( new Attribute ( TRAINLENGTH , String . valueOf ( train . getTrainLength ( ) ) ) ) ; status . add ( new Attribute ( TRAINWEIGHT , String . valueOf ( train . getTrainWeight ( ) ) ) ) ; status . add ( new Attribute ( TRAINCARS , String . valueOf ( train . getNumberCarsInTrain ( ) ) ) ) ; status . add ( new Attribute ( TRAINLEADLOCO , constructTrainLeadLoco ( train . getName ( ) ) ) ) ; status . add ( new Attribute ( TRAINCABOOSE , constructTrainCaboose ( train . getName ( ) ) ) ) ; sendMessage ( status ) ; } }
sends the full status for a train to a client
