private static List<ConnectionNotation> getSelfCycleConnections(String id, List<ConnectionNotation> connections) {
    List<ConnectionNotation> list = new ArrayList<ConnectionNotation>();
    for (ConnectionNotation connection : connections) {
      if (connection.getSourceId().getId().equals(id)) {
        list.add(connection);
      }
    }
    return list;
  }
private static List < ConnectionNotation > getSelfCycleConnections ( String id , List < ConnectionNotation > connections ) { List < ConnectionNotation > list = new ArrayList < ConnectionNotation > ( ) ; for ( ConnectionNotation connection : connections ) { if ( connection . getSourceId ( ) . getId ( ) . equals ( id ) ) { list . add ( connection ) ; } } return list ; }
method to get for one polymer all self-cycle ConnectionNotations

@param id polymer id
@param connections list of ConnectionNotation
@return list of all self-cycle connections