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

de.schegge.phone.freshmarker.TemplatePhoneNumber Maven / Gradle / Ivy

The newest version!
package de.schegge.phone.freshmarker;

import de.schegge.phone.InternationalPhoneNumber;
import de.schegge.phone.PhoneNumber;
import org.freshmarker.core.model.primitive.TemplatePrimitive;

public class TemplatePhoneNumber extends TemplatePrimitive {
    private final boolean international;
    public TemplatePhoneNumber(PhoneNumber phoneNumber, boolean international) {
        super(phoneNumber);
        this.international = international;
    }

    public PhoneNumber getNational() {
        return international ? ((InternationalPhoneNumber)getValue()).toNational() : getValue();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy