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

org.lwapp.notification.twitter.Tweet Maven / Gradle / Ivy

Go to download

Lwapp notification is a utility jar file with most common notification features(email, sms, twitter) needed in daily java programming.

The newest version!
package org.lwapp.notification.twitter;

import java.io.Serializable;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;

import org.apache.commons.lang3.Validate;

@XmlRootElement(name = "Tweet")
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "Tweet", propOrder = { "to", "message" })
public class Tweet implements Serializable {

	private static final long serialVersionUID = 1L;

	private final String to;
	private final String message;

	@SuppressWarnings("unused")
	private Tweet() {
		this.to = null;
		this.message = null;
	}

	public Tweet(final String to, final String message) {
		Validate.notBlank(to, "Twitter to handle is mandatory.");
		Validate.notBlank(message, "Tweet message is mandatory.");
		this.to = to;
		this.message = message;
	}

	public String getTo() {
		return to;
	}

	public String getMessage() {
		return message;
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy