Changeset 30737 in osm for applications/editors/josm/plugins/reltoolbox/src/relcontext
- Timestamp:
- 2014-10-18T23:07:52+02:00 (10 years ago)
- Location:
- applications/editors/josm/plugins/reltoolbox/src/relcontext
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/reltoolbox/src/relcontext/ChosenRelation.java
r29531 r30737 20 20 public class ChosenRelation implements EditLayerChangeListener, MapViewPaintable, DataSetListener { 21 21 protected Relation chosenRelation = null; 22 private Set<ChosenRelationListener> chosenRelationListeners = new HashSet< ChosenRelationListener>();22 private Set<ChosenRelationListener> chosenRelationListeners = new HashSet<>(); 23 23 24 24 public void set( Relation rel ) { -
applications/editors/josm/plugins/reltoolbox/src/relcontext/RelContextDialog.java
r30532 r30737 358 358 return; 359 359 360 Set<Relation> relations = new TreeSet< Relation>(360 Set<Relation> relations = new TreeSet<>( 361 361 DefaultNameFormatter.getInstance().getRelationComparator()); 362 362 for( OsmPrimitive element : newSelection ) { … … 415 415 416 416 private static Map<String, List<String>> loadRoles() { 417 Map<String, List<String>> result = new HashMap< String, List<String>>();417 Map<String, List<String>> result = new HashMap<>(); 418 418 try { 419 419 ClassLoader classLoader = RelContextDialog.class.getClassLoader(); … … 425 425 if( t.hasMoreTokens() ) { 426 426 String type = t.nextToken(); 427 List<String> roles = new ArrayList< String>();427 List<String> roles = new ArrayList<>(); 428 428 while( t.hasMoreTokens() ) 429 429 roles.add(t.nextToken()); … … 442 442 JPanel panel = new JPanel(new GridBagLayout()); 443 443 444 List<String> items = new ArrayList< String>();444 List<String> items = new ArrayList<>(); 445 445 for( String role : roleBoxModel.getRoles() ) { 446 446 if( role.length() > 1 ) … … 527 527 Collection<OsmPrimitive> selected = Main.main.getCurrentDataSet().getSelected(); 528 528 Relation r = chosenRelation.get(); 529 List<Command> commands = new ArrayList< Command>();529 List<Command> commands = new ArrayList<>(); 530 530 for( int i = 0; i < r.getMembersCount(); i++ ) { 531 531 RelationMember m = r.getMember(i); … … 623 623 624 624 private class RoleComboBoxModel extends AbstractListModel<String> implements ComboBoxModel<String> { 625 private List<String> roles = new ArrayList< String>();625 private List<String> roles = new ArrayList<>(); 626 626 private int selectedIndex = -1; 627 627 private JComboBox<String> combobox; … … 646 646 combobox.setEnabled(true); 647 647 648 List<String> items = new ArrayList< String>();648 List<String> items = new ArrayList<>(); 649 649 if( chosenRelation != null && chosenRelation.get() != null ) { 650 650 if( chosenRelation.isMultipolygon() ) { -
applications/editors/josm/plugins/reltoolbox/src/relcontext/actions/AddRemoveMemberAction.java
r30701 r30737 52 52 Relation r = new Relation(rel.get()); 53 53 54 Collection<OsmPrimitive> toAdd = new ArrayList< OsmPrimitive>(getCurrentDataSet().getSelected());54 Collection<OsmPrimitive> toAdd = new ArrayList<>(getCurrentDataSet().getSelected()); 55 55 toAdd.remove(rel.get()); 56 56 toAdd.removeAll(r.getMemberPrimitives()); … … 132 132 state = 0; 133 133 else { 134 Collection<OsmPrimitive> toAdd = new ArrayList< OsmPrimitive>(getCurrentDataSet().getSelected());134 Collection<OsmPrimitive> toAdd = new ArrayList<>(getCurrentDataSet().getSelected()); 135 135 toAdd.remove(rel.get()); 136 136 int selectedSize = toAdd.size(); -
applications/editors/josm/plugins/reltoolbox/src/relcontext/actions/CreateMultipolygonAction.java
r30701 r30737 69 69 } else { 70 70 if( TheRing.areAllOfThoseRings(selectedWays) ) { 71 List<Command> commands = new ArrayList< Command>();71 List<Command> commands = new ArrayList<>(); 72 72 rels = TheRing.makeManySimpleMultipolygons(getCurrentDataSet().getSelectedWays(), commands); 73 73 if( !commands.isEmpty() ) … … 108 108 if( !list.isEmpty() && isBoundary ) { 109 109 Main.main.undoRedo.add(new SequenceCommand(tr("Move tags from ways to relation"), list)); 110 list = new ArrayList< Command>();110 list = new ArrayList<>(); 111 111 } 112 112 if( isBoundary ) { … … 179 179 */ 180 180 private List<Command> fixWayTagsForBoundary( Relation rel ) { 181 List<Command> commands = new ArrayList< Command>();181 List<Command> commands = new ArrayList<>(); 182 182 if( !rel.hasKey("boundary") || !rel.hasKey("admin_level") ) 183 183 return commands; … … 189 189 return commands; 190 190 } 191 Set<OsmPrimitive> waysBoundary = new HashSet< OsmPrimitive>();192 Set<OsmPrimitive> waysAdminLevel = new HashSet< OsmPrimitive>();191 Set<OsmPrimitive> waysBoundary = new HashSet<>(); 192 Set<OsmPrimitive> waysAdminLevel = new HashSet<>(); 193 193 for( OsmPrimitive p : rel.getMemberPrimitives() ) { 194 194 if( p instanceof Way ) { … … 222 222 } 223 223 static public final List<String> DEFAULT_LINEAR_TAGS = Arrays.asList(new String[] {"barrier", "source"}); 224 private static final Set<String> REMOVE_FROM_BOUNDARY_TAGS = new TreeSet< String>(Arrays.asList(new String[] {224 private static final Set<String> REMOVE_FROM_BOUNDARY_TAGS = new TreeSet<>(Arrays.asList(new String[] { 225 225 "boundary", "boundary_type", "type", "admin_level" 226 226 })); … … 232 232 */ 233 233 private List<Command> removeTagsFromInnerWays( Relation relation ) { 234 Map<String, String> values = new HashMap< String, String>();234 Map<String, String> values = new HashMap<>(); 235 235 236 236 if( relation.hasKeys() ) { … … 240 240 } 241 241 242 List<Way> innerWays = new ArrayList< Way>();243 List<Way> outerWays = new ArrayList< Way>();244 245 Set<String> conflictingKeys = new TreeSet< String>();242 List<Way> innerWays = new ArrayList<>(); 243 List<Way> outerWays = new ArrayList<>(); 244 245 Set<String> conflictingKeys = new TreeSet<>(); 246 246 247 247 for( RelationMember m : relation.getMembers() ) { … … 284 284 String name = values.get("name"); 285 285 if( isBoundary ) { 286 Set<String> keySet = new TreeSet< String>(values.keySet());286 Set<String> keySet = new TreeSet<>(values.keySet()); 287 287 for( String key : keySet ) 288 288 if( !REMOVE_FROM_BOUNDARY_TAGS.contains(key) ) … … 292 292 values.put("area", "yes"); 293 293 294 List<Command> commands = new ArrayList< Command>();294 List<Command> commands = new ArrayList<>(); 295 295 boolean moveTags = getPref("tags"); 296 296 297 297 for( String key : values.keySet() ) { 298 List<OsmPrimitive> affectedWays = new ArrayList< OsmPrimitive>();298 List<OsmPrimitive> affectedWays = new ArrayList<>(); 299 299 String value = values.get(key); 300 300 -
applications/editors/josm/plugins/reltoolbox/src/relcontext/actions/DownloadChosenRelationAction.java
r30145 r30737 68 68 protected void downloadIncomplete( Relation rel ) { 69 69 if( rel.isNew() ) return; 70 Set<OsmPrimitive> ret = new HashSet< OsmPrimitive>();70 Set<OsmPrimitive> ret = new HashSet<>(); 71 71 ret.addAll(rel.getIncompleteMembers()); 72 72 if( ret.isEmpty() ) return; -
applications/editors/josm/plugins/reltoolbox/src/relcontext/actions/DownloadParentsAction.java
r30264 r30737 43 43 Relation relation = rel.get(); 44 44 if( relation == null ) return; 45 List<OsmPrimitive> objects = new ArrayList< OsmPrimitive>();45 List<OsmPrimitive> objects = new ArrayList<>(); 46 46 objects.add(relation); 47 47 objects.addAll(relation.getMemberPrimitives()); … … 61 61 protected void downloadIncomplete( Relation rel ) { 62 62 if( rel.isNew() ) return; 63 Set<OsmPrimitive> ret = new HashSet< OsmPrimitive>();63 Set<OsmPrimitive> ret = new HashSet<>(); 64 64 ret.addAll(rel.getIncompleteMembers()); 65 65 if( ret.isEmpty() ) return; -
applications/editors/josm/plugins/reltoolbox/src/relcontext/actions/FindRelationAction.java
r30532 r30737 123 123 String[] keywords = filter == null ? new String[0] : filter.split("\\s+"); 124 124 if( keywords.length > 0 ) { 125 List<String> filteredKeywords = new ArrayList< String>(keywords.length);125 List<String> filteredKeywords = new ArrayList<>(keywords.length); 126 126 for( String s : keywords ) 127 127 if( s.length() > 0 ) … … 134 134 System.out.println("keyword["+i+"] = " + keywords[i]); 135 135 136 List<Relation> relations = new ArrayList< Relation>();136 List<Relation> relations = new ArrayList<>(); 137 137 if( getEditLayer() != null ) { 138 138 for( Relation r : getEditLayer().data.getRelations() ) { … … 168 168 */ 169 169 protected class FindRelationListModel extends AbstractListModel<Relation> { 170 private final ArrayList<Relation> relations = new ArrayList< Relation>();170 private final ArrayList<Relation> relations = new ArrayList<>(); 171 171 private DefaultListSelectionModel selectionModel; 172 172 -
applications/editors/josm/plugins/reltoolbox/src/relcontext/actions/ReconstructPolygonAction.java
r30587 r30737 55 55 public void actionPerformed( ActionEvent e ) { 56 56 Relation r = rel.get(); 57 List<Way> ways = new ArrayList< Way>();57 List<Way> ways = new ArrayList<>(); 58 58 boolean wont = false; 59 59 for( RelationMember m : r.getMembers() ) { … … 81 81 82 82 rel.clear(); 83 List<Way> newSelection = new ArrayList< Way>();84 List<Command> commands = new ArrayList< Command>();83 List<Way> newSelection = new ArrayList<>(); 84 List<Command> commands = new ArrayList<>(); 85 85 Command c = DeleteCommand.delete(Main.main.getEditLayer(), Collections.singleton(r), true, true); 86 86 if( c == null ) … … 92 92 Map<String, String> tags = p.ways.get(0).getKeys(); 93 93 List<OsmPrimitive> relations = p.ways.get(0).getReferrers(); 94 Set<String> noTags = new HashSet< String>(r.keySet());94 Set<String> noTags = new HashSet<>(r.keySet()); 95 95 for( int i = 1; i < p.ways.size(); i++ ) { 96 96 Way w = p.ways.get(i); … … 115 115 if( w.getReferrers().equals(relations) ) { 116 116 // check tags that remain 117 Set<String> keys = new HashSet< String>(w.keySet());117 Set<String> keys = new HashSet<>(w.keySet()); 118 118 keys.removeAll(tags.keySet()); 119 119 keys.removeAll(IRRELEVANT_KEYS); -
applications/editors/josm/plugins/reltoolbox/src/relcontext/actions/RelationHelpAction.java
r25711 r30737 43 43 String base = Main.pref.get("url.openstreetmap-wiki", "http://wiki.openstreetmap.org/wiki/"); 44 44 String lang = LanguageInfo.getWikiLanguagePrefix(); 45 final List<URI> uris = new ArrayList< URI>();45 final List<URI> uris = new ArrayList<>(); 46 46 String type = URLEncoder.encode(rel.get().get("type"), "UTF-8"); 47 47 -
applications/editors/josm/plugins/reltoolbox/src/relcontext/actions/SortAndFixAction.java
r28703 r30737 39 39 40 40 // construct all available fixers 41 fixers = new ArrayList< RelationFixer>();41 fixers = new ArrayList<>(); 42 42 //should be before multipolygon as takes special case of multipolygon relation - boundary 43 43 fixers.add(new BoundaryFixer()); // boundary, multipolygon, boundary=administrative -
applications/editors/josm/plugins/reltoolbox/src/relcontext/actions/SplittingMultipolygons.java
r29854 r30737 24 24 25 25 public static boolean canProcess( Collection<Way> ways ) { 26 List<Way> rings = new ArrayList< Way>();27 List<Way> arcs = new ArrayList< Way>();26 List<Way> rings = new ArrayList<>(); 27 List<Way> arcs = new ArrayList<>(); 28 28 Area a = Main.main.getCurrentDataSet().getDataSourceArea(); 29 29 for( Way way : ways ) { … … 70 70 public static List<Relation> process( Collection<Way> selectedWays ) { 71 71 // System.out.println("---------------------------------------"); 72 List<Relation> result = new ArrayList< Relation>();73 List<Way> rings = new ArrayList< Way>();74 List<Way> arcs = new ArrayList< Way>();72 List<Relation> result = new ArrayList<>(); 73 List<Way> rings = new ArrayList<>(); 74 List<Way> arcs = new ArrayList<>(); 75 75 for( Way way : selectedWays ) { 76 76 if( way.isClosed() ) … … 81 81 82 82 for( Way ring : rings ) { 83 List<Command> commands = new ArrayList< Command>();83 List<Command> commands = new ArrayList<>(); 84 84 Relation newRelation = SplittingMultipolygons.attachRingToNeighbours(ring, commands); 85 85 if( newRelation != null && !commands.isEmpty() ) { … … 90 90 91 91 for( Way arc : arcs) { 92 List<Command> commands = new ArrayList< Command>();92 List<Command> commands = new ArrayList<>(); 93 93 Relation newRelation = SplittingMultipolygons.tryToCloseOneWay(arc, commands); 94 94 if( newRelation != null && !commands.isEmpty() ) { … … 105 105 private static void closePolygon( List<Node> base, List<Node> append ) { 106 106 if( append.get(0).equals(base.get(0)) && append.get(append.size() - 1).equals(base.get(base.size() - 1)) ) { 107 List<Node> ap2 = new ArrayList< Node>(append);107 List<Node> ap2 = new ArrayList<>(append); 108 108 Collections.reverse(ap2); 109 109 append = ap2; … … 131 131 */ 132 132 public static List<Way> splitWay( Way w, Node n1, Node n2, List<Command> commands ) { 133 List<Node> nodes = new ArrayList< Node>(w.getNodes());133 List<Node> nodes = new ArrayList<>(w.getNodes()); 134 134 if( w.isClosed() ) 135 135 nodes.remove(nodes.size() - 1); … … 150 150 151 151 // make a list of segments 152 List<List<Node>> chunks = new ArrayList< List<Node>>(2);153 List<Node> chunk = new ArrayList< Node>();152 List<List<Node>> chunks = new ArrayList<>(2); 153 List<Node> chunk = new ArrayList<>(); 154 154 for( int i = 0; i < nodes.size(); i++ ) { 155 155 chunk.add(nodes.get(i)); 156 156 if( (w.isClosed() || chunk.size() > 1) && (i == index1 || i == index2) ) { 157 157 chunks.add(chunk); 158 chunk = new ArrayList< Node>();158 chunk = new ArrayList<>(); 159 159 chunk.add(nodes.get(i)); 160 160 } … … 177 177 178 178 // build a map of referencing relations 179 Map<Relation, Integer> references = new HashMap< Relation, Integer>();180 List<Command> relationCommands = new ArrayList< Command>();179 Map<Relation, Integer> references = new HashMap<>(); 180 List<Command> relationCommands = new ArrayList<>(); 181 181 for( OsmPrimitive p : w.getReferrers() ) { 182 182 if( p instanceof Relation ) { … … 191 191 192 192 // build ways 193 List<Way> result = new ArrayList< Way>();193 List<Way> result = new ArrayList<>(); 194 194 Way updatedWay = commands == null ? w : new Way(w); 195 195 updatedWay.setNodes(chunks.get(0)); … … 245 245 246 246 // time to create a new multipolygon relation and a command stack 247 List<Command> commands = new ArrayList< Command>();247 List<Command> commands = new ArrayList<>(); 248 248 Relation newRelation = new Relation(); 249 249 newRelation.put("type", "multipolygon"); … … 263 263 264 264 // now split the way, at last 265 List<Way> newWays = new ArrayList< Way>(splitWay(target, segment.firstNode(), segment.lastNode(), commands));265 List<Way> newWays = new ArrayList<>(splitWay(target, segment.firstNode(), segment.lastNode(), commands)); 266 266 267 267 Way addingWay = null; … … 269 269 Way utarget = newWays.get(1); 270 270 Way alternate = newWays.get(0); 271 List<Node> testRing = new ArrayList< Node>(segment.getNodes());271 List<Node> testRing = new ArrayList<>(segment.getNodes()); 272 272 closePolygon(testRing, utarget.getNodes()); 273 273 addingWay = segmentInsidePolygon(alternate.getNode(0), alternate.getNode(1), testRing) ? alternate : utarget; … … 292 292 */ 293 293 private static <T> List<T> intersection( Collection<T> list1, Collection<T> list2 ) { 294 List<T> result = new ArrayList< T>();294 List<T> result = new ArrayList<>(); 295 295 for( T item : list1 ) 296 296 if( list2.contains(item) ) … … 305 305 if( !ring.isClosed() || ring.isIncomplete() ) 306 306 return null; 307 Map<Way, Boolean> touchingWays = new HashMap< Way, Boolean>();307 Map<Way, Boolean> touchingWays = new HashMap<>(); 308 308 for( Node n : ring.getNodes() ) { 309 309 for( OsmPrimitive p : n.getReferrers() ) { … … 322 322 } 323 323 324 List<TheRing> otherWays = new ArrayList< TheRing>();324 List<TheRing> otherWays = new ArrayList<>(); 325 325 for( Way w : touchingWays.keySet() ) 326 326 if( touchingWays.get(w) ) { … … 335 335 336 336 // now touchingWays has only ways that touch the ring twice 337 List<Command> commands = new ArrayList< Command>();337 List<Command> commands = new ArrayList<>(); 338 338 TheRing theRing = new TheRing(ring); // this is actually useful 339 339 … … 345 345 otherRing.putSourceWayFirst(); 346 346 347 Map<Relation, Relation> relationCache = new HashMap< Relation, Relation>();347 Map<Relation, Relation> relationCache = new HashMap<>(); 348 348 for( TheRing otherRing : otherWays ) 349 349 commands.addAll(otherRing.getCommands(false, relationCache)); -
applications/editors/josm/plugins/reltoolbox/src/relcontext/actions/TheRing.java
r29535 r30737 37 37 public TheRing( Way source ) { 38 38 this.source = source; 39 segments = new ArrayList< RingSegment>(1);39 segments = new ArrayList<>(1); 40 40 segments.add(new RingSegment(source)); 41 41 } 42 42 43 43 public static boolean areAllOfThoseRings( Collection<Way> ways ) { 44 List<Way> rings = new ArrayList< Way>();44 List<Way> rings = new ArrayList<>(); 45 45 for( Way way : ways ) { 46 46 if( way.isClosed() ) … … 70 70 public static List<Relation> makeManySimpleMultipolygons( Collection<Way> selection, List<Command> commands ) { 71 71 log("---------------------------------------"); 72 List<TheRing> rings = new ArrayList< TheRing>(selection.size());72 List<TheRing> rings = new ArrayList<>(selection.size()); 73 73 for( Way w : selection ) 74 74 rings.add(new TheRing(w)); … … 77 77 rings.get(i).collide(rings.get(j)); 78 78 redistributeSegments(rings); 79 List<Relation> relations = new ArrayList< Relation>();80 Map<Relation, Relation> relationCache = new HashMap< Relation, Relation>();79 List<Relation> relations = new ArrayList<>(); 80 Map<Relation, Relation> relationCache = new HashMap<>(); 81 81 for( TheRing r : rings ) { 82 82 commands.addAll(r.getCommands(relationCache)); … … 247 247 public static void redistributeSegments( List<TheRing> rings ) { 248 248 // build segments map 249 Map<RingSegment, TheRing> segmentMap = new HashMap< RingSegment, TheRing>();249 Map<RingSegment, TheRing> segmentMap = new HashMap<>(); 250 250 for( TheRing ring : rings ) 251 251 for( RingSegment seg : ring.segments ) … … 317 317 318 318 // build a map of referencing relations 319 Map<Relation, Integer> referencingRelations = new HashMap< Relation, Integer>();320 List<Command> relationCommands = new ArrayList< Command>();319 Map<Relation, Integer> referencingRelations = new HashMap<>(); 320 List<Command> relationCommands = new ArrayList<>(); 321 321 for( OsmPrimitive p : source.getReferrers() ) { 322 322 if( p instanceof Relation ) { … … 342 342 // поÑ�тому Ñ�охранÑ�етÑ�Ñ� только первое изменение 343 343 344 List<Command> commands = new ArrayList< Command>();344 List<Command> commands = new ArrayList<>(); 345 345 boolean foundOwnWay = false; 346 346 for( RingSegment seg : segments ) { … … 464 464 if( pos <= 0 || pos >= nodes.size() - 1 ) 465 465 return null; 466 List<Node> newNodes = new ArrayList< Node>(nodes.subList(pos, nodes.size()));466 List<Node> newNodes = new ArrayList<>(nodes.subList(pos, nodes.size())); 467 467 nodes.subList(pos + 1, nodes.size()).clear(); 468 468 return new RingSegment(newNodes); … … 489 489 return null; 490 490 491 List<Node> newNodes = new ArrayList< Node>();491 List<Node> newNodes = new ArrayList<>(); 492 492 if( pos2 > pos1 ) { 493 493 newNodes.addAll(nodes.subList(pos2, nodes.size())); … … 499 499 } else { 500 500 newNodes.addAll(nodes.subList(pos2, pos1 + 1)); 501 nodes.addAll(new ArrayList< Node>(nodes.subList(0, pos2 + 1)));501 nodes.addAll(new ArrayList<>(nodes.subList(0, pos2 + 1))); 502 502 nodes.subList(0, pos1).clear(); 503 503 } … … 513 513 if( nodes == null ) 514 514 throw new IllegalArgumentException("Won't give you wayNodes: it is a reference"); 515 List<Node> wayNodes = new ArrayList< Node>(nodes);515 List<Node> wayNodes = new ArrayList<>(nodes); 516 516 if( isRing ) 517 517 wayNodes.add(wayNodes.get(0)); -
applications/editors/josm/plugins/reltoolbox/src/relcontext/relationfix/AssociatedStreetFixer.java
r28762 r30737 100 100 101 101 // fill relation name 102 Map<String, Integer> streetNames = new HashMap< String, Integer>();102 Map<String, Integer> streetNames = new HashMap<>(); 103 103 for (RelationMember m : rel.getMembers()) 104 104 if ("street".equals(m.getRole()) && m.isWay()) { … … 126 126 } 127 127 128 List<Command> commandList = new ArrayList< Command>();128 List<Command> commandList = new ArrayList<>(); 129 129 if (fixed) { 130 130 commandList.add(new ChangeCommand(source, rel)); -
applications/editors/josm/plugins/reltoolbox/src/relcontext/relationfix/MultipolygonFixer.java
r30587 r30737 52 52 */ 53 53 protected Relation fixMultipolygonRoles( Relation source ) { 54 Collection<Way> ways = new ArrayList< Way>();54 Collection<Way> ways = new ArrayList<>(); 55 55 for( OsmPrimitive p : source.getMemberPrimitives() ) 56 56 if( p instanceof Way ) … … 63 63 Relation r = new Relation(source); 64 64 boolean fixed = false; 65 Set<Way> outerWays = new HashSet< Way>();65 Set<Way> outerWays = new HashSet<>(); 66 66 for( MultipolygonBuilder.JoinedPolygon poly : mpc.outerWays ) 67 67 for( Way w : poly.ways ) 68 68 outerWays.add(w); 69 Set<Way> innerWays = new HashSet< Way>();69 Set<Way> innerWays = new HashSet<>(); 70 70 for( MultipolygonBuilder.JoinedPolygon poly : mpc.innerWays ) 71 71 for( Way w : poly.ways ) -
applications/editors/josm/plugins/reltoolbox/src/relcontext/relationfix/RelationFixer.java
r28703 r30737 23 23 */ 24 24 public RelationFixer(String... types) { 25 applicableTypes = new ArrayList< String>();25 applicableTypes = new ArrayList<>(); 26 26 for(String type: types) { 27 27 applicableTypes.add(type);
Note:
See TracChangeset
for help on using the changeset viewer.