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

com.phloc.masterdata.trade.EIncoterm Maven / Gradle / Ivy

There is a newer version: 3.7.6
Show newest version
/**
 * Copyright (C) 2006-2014 phloc systems
 * http://www.phloc.com
 * office[at]phloc[dot]com
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *         http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.phloc.masterdata.trade;

import java.util.Locale;

import javax.annotation.Nonnull;
import javax.annotation.Nullable;

import com.phloc.commons.annotations.Nonempty;
import com.phloc.commons.id.IHasID;
import com.phloc.commons.lang.EnumHelper;
import com.phloc.commons.name.IHasDisplayText;

/**
 * Possible delivery terms based on Incoterms.
* See Technical documentation 6.5
* http://de.wikipedia.org/wiki/Incoterms * * @author Philip Helger */ public enum EIncoterm implements IHasID , IHasDisplayText { // Order as in in Incoterms 2000 EXW ("EXW", EIncotermName.EXW), FCA ("FCA", EIncotermName.FCA), FAS ("FAS", EIncotermName.FAS), FOB ("FOB", EIncotermName.FOB), CFR ("CFR", EIncotermName.CFR), CIF ("CIF", EIncotermName.CIF), CPT ("CPT", EIncotermName.CPT), CIP ("CIP", EIncotermName.CIP), DAF ("DAF", EIncotermName.DAF), DES ("DES", EIncotermName.DES), DEQ ("DEQ", EIncotermName.DEQ), DDU ("DDU", EIncotermName.DDU), DDP ("DDP", EIncotermName.DDP); private final String m_sID; private final IHasDisplayText m_aName; private EIncoterm (@Nonnull @Nonempty final String sID, @Nonnull final EIncotermName eDeliveryTermName) { m_sID = sID; m_aName = eDeliveryTermName; } @Nonnull @Nonempty public String getID () { return m_sID; } @Nonnull public String getDisplayText (@Nonnull final Locale aContentLocale) { return m_aName.getDisplayText (aContentLocale) + " (" + m_sID + ')'; } @Nullable public static EIncoterm getFromIDOrNull (@Nullable final String sID) { return EnumHelper.getFromIDOrNull (EIncoterm.class, sID); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy