de.schegge.phone.freshmarker.TemplatePhoneNumber Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of telephone Show documentation
Show all versions of telephone Show documentation
A Java API for national and international phone numbers
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();
}
}