Newer
Older
RxSprout / app / src / main / java / com / example / sprout / rooms / Rooms.java
KeijuMatsumoto on 28 Nov 2017 722 bytes [add] Project
package com.example.sprout.rooms;

import net.arnx.jsonic.JSONHint;

import java.util.HashMap;

public class Rooms {

    public HashMap<Integer, Room> roomList = new HashMap<Integer, Room>();
    public int roomId;

    public Rooms() {

    }

    @JSONHint(ignore = true)
    public int getRoomCount() {
        return roomList.size();
    }

    @JSONHint(ignore = true)
    public Room getRoomById(int roomId) {
        return roomList.get(roomId);
    }

    @JSONHint(ignore = true)
    public Room getRoomByIndex(int index) {
        Object rooms[] = roomList.values().toArray();
        return (Room) rooms[index];
    }
	
    @JSONHint(ignore = true)
    public int getRoomId() {
        return roomId;
    }

}