org.rx.net.support.IPAddress Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of rxlib Show documentation
Show all versions of rxlib Show documentation
A set of utilities for Java
package org.rx.net.support;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import lombok.Setter;
import lombok.ToString;
import org.rx.core.Strings;
import java.io.Serializable;
@RequiredArgsConstructor
@Getter
@Setter
@ToString
public class IPAddress implements Serializable {
private static final long serialVersionUID = 1529992648624772634L;
private final String ip;
private final String country;
private final String countryCode;
private final String city;
private final String ISP;
private final String extra;
public boolean isChina() {
return Strings.equalsIgnoreCase(countryCode, "CN");
}
}