com.github.jasminb.jsonapi.Link Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jsonapi-converter Show documentation
Show all versions of jsonapi-converter Show documentation
JSONAPI-Converter is a library that provides means for integrating with services using JSON API specification.
package com.github.jasminb.jsonapi;
import java.io.Serializable;
import java.util.Map;
/**
* Models a JSON API Link object.
*/
public class Link implements Serializable {
private static final long serialVersionUID = -6509249812347545112L;
private String href;
private Map meta;
/**
* Creates new Link.
*/
public Link() {
// Empty CTOR
}
/**
* Creates new Link.
*
* @param href {@link String} link value
*/
public Link(String href) {
this.href = href;
}
/**
* Creates new Link.
*
* @param href {@link String} link value
* @param meta {@link Map} link meta
*/
public Link(String href, Map meta) {
this.href = href;
this.meta = meta;
}
/**
* Gets href.
*
* @return the href
*/
public String getHref() {
return href;
}
/**
* Sets href.
*
* @param href the href
*/
public void setHref(String href) {
this.href = href;
}
/**
* Gets meta.
*
* @return the meta
*/
public Map getMeta() {
return meta;
}
/**
* Sets meta.
*
* @param meta the meta
*/
public void setMeta(Map meta) {
this.meta = meta;
}
@Override
public String toString() {
return String.valueOf(getHref());
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy