project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/Datastructures/RoomWithId.java
changeset 7508 763d3961400b
child 7584 7831c84cc644
equal deleted inserted replaced
7504:ed1d52c5aa94 7508:763d3961400b
       
     1 package org.hedgewars.hedgeroid.Datastructures;
       
     2 
       
     3 import java.util.Comparator;
       
     4 
       
     5 public final class RoomWithId {
       
     6 	public final Room room;
       
     7 	public final long id;
       
     8 	
       
     9 	public RoomWithId(Room room, long id) {
       
    10 		this.room = room;
       
    11 		this.id = id;
       
    12 	}
       
    13 
       
    14 	@Override
       
    15 	public String toString() {
       
    16 		return "RoomWithId [room=" + room + ", id=" + id + "]";
       
    17 	}
       
    18 	
       
    19 	public static final Comparator<RoomWithId> NEWEST_FIRST_ORDER = new Comparator<RoomWithId>() {
       
    20 		public int compare(RoomWithId lhs, RoomWithId rhs) {
       
    21 			return rhs.id<lhs.id ? -1 : rhs.id>lhs.id ? 1 : 0;
       
    22 		}
       
    23 	};
       
    24 }