All Downloads are FREE. Search and download functionalities are using the official Maven repository.

pro.zackpollard.telegrambot.api.internal.chat.message.content.LocationContentImpl Maven / Gradle / Ivy

There is a newer version: 1.6.5
Show newest version
package pro.zackpollard.telegrambot.api.internal.chat.message.content;

import org.json.JSONObject;
import pro.zackpollard.telegrambot.api.chat.message.content.LocationContent;
import pro.zackpollard.telegrambot.api.chat.message.content.type.Location;
import pro.zackpollard.telegrambot.api.internal.chat.message.content.type.LocationImpl;

/**
 * @author Zack Pollard
 */
public class LocationContentImpl implements LocationContent {

	private final Location content;

	private LocationContentImpl(JSONObject jsonObject) {

		this.content = LocationImpl.createLocation(jsonObject);
	}

	public static LocationContent createLocationContent(JSONObject jsonObject) {

		return jsonObject != null ? new LocationContentImpl(jsonObject) : null;
	}

	@Override
	public Location getContent() {
		return content;
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy