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

org.rx.net.support.IPAddress Maven / Gradle / Ivy

There is a newer version: 3.0.0
Show newest version
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");
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy