private int isHeadAssignedHere(SignalHead head,LayoutTurnout lTurnout){
  String sysName=head.getSystemName();
  String uName=head.getUserName();
  String name=lTurnout.getSignalA1Name();
  if ((name != null) && (name.length() > 0) && ((name.equals(uName)) || (name.equals(sysName)))) {
    return A1;
  }
  name=lTurnout.getSignalA2Name();
  if ((name != null) && (name.length() > 0) && ((name.equals(uName)) || (name.equals(sysName)))) {
    return A2;
  }
  name=lTurnout.getSignalA3Name();
  if ((name != null) && (name.length() > 0) && ((name.equals(uName)) || (name.equals(sysName)))) {
    return A3;
  }
  name=lTurnout.getSignalB1Name();
  if ((name != null) && (name.length() > 0) && ((name.equals(uName)) || (name.equals(sysName)))) {
    return B1;
  }
  name=lTurnout.getSignalB2Name();
  if ((name != null) && (name.length() > 0) && ((name.equals(uName)) || (name.equals(sysName)))) {
    return B2;
  }
  name=lTurnout.getSignalC1Name();
  if ((name != null) && (name.length() > 0) && ((name.equals(uName)) || (name.equals(sysName)))) {
    return C1;
  }
  name=lTurnout.getSignalC2Name();
  if ((name != null) && (name.length() > 0) && ((name.equals(uName)) || (name.equals(sysName)))) {
    return C2;
  }
  name=lTurnout.getSignalD1Name();
  if ((name != null) && (name.length() > 0) && ((name.equals(uName)) || (name.equals(sysName)))) {
    return D1;
  }
  name=lTurnout.getSignalD2Name();
  if ((name != null) && (name.length() > 0) && ((name.equals(uName)) || (name.equals(sysName)))) {
    return D2;
  }
  return NONE;
}

private int isHeadAssignedHere ( SignalHead head , LayoutTurnout lTurnout ) { String sysName = head . getSystemName ( ) ; String uName = head . getUserName ( ) ; String name = lTurnout . getSignalA1Name ( ) ; if ( ( name != null ) && ( name . length ( ) > 0 ) && ( ( name . equals ( uName ) ) || ( name . equals ( sysName ) ) ) ) { return A1 ; } name = lTurnout . getSignalA2Name ( ) ; if ( ( name != null ) && ( name . length ( ) > 0 ) && ( ( name . equals ( uName ) ) || ( name . equals ( sysName ) ) ) ) { return A2 ; } name = lTurnout . getSignalA3Name ( ) ; if ( ( name != null ) && ( name . length ( ) > 0 ) && ( ( name . equals ( uName ) ) || ( name . equals ( sysName ) ) ) ) { return A3 ; } name = lTurnout . getSignalB1Name ( ) ; if ( ( name != null ) && ( name . length ( ) > 0 ) && ( ( name . equals ( uName ) ) || ( name . equals ( sysName ) ) ) ) { return B1 ; } name = lTurnout . getSignalB2Name ( ) ; if ( ( name != null ) && ( name . length ( ) > 0 ) && ( ( name . equals ( uName ) ) || ( name . equals ( sysName ) ) ) ) { return B2 ; } name = lTurnout . getSignalC1Name ( ) ; if ( ( name != null ) && ( name . length ( ) > 0 ) && ( ( name . equals ( uName ) ) || ( name . equals ( sysName ) ) ) ) { return C1 ; } name = lTurnout . getSignalC2Name ( ) ; if ( ( name != null ) && ( name . length ( ) > 0 ) && ( ( name . equals ( uName ) ) || ( name . equals ( sysName ) ) ) ) { return C2 ; } name = lTurnout . getSignalD1Name ( ) ; if ( ( name != null ) && ( name . length ( ) > 0 ) && ( ( name . equals ( uName ) ) || ( name . equals ( sysName ) ) ) ) { return D1 ; } name = lTurnout . getSignalD2Name ( ) ; if ( ( name != null ) && ( name . length ( ) > 0 ) && ( ( name . equals ( uName ) ) || ( name . equals ( sysName ) ) ) ) { return D2 ; } return NONE ; }
returns an index if the specified signal head is assigned to the layoutturnout initialized . otherwise returns the none index . the index specifies the turnout position of the signal head according to the code listed at the beginning of this module .
