Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/**
* Copyright (C) 2014-2018 Philip Helger (www.helger.com)
* philip[at]helger[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.helger.masterdata.trade;
import java.util.Locale;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import com.helger.commons.annotation.Nonempty;
import com.helger.commons.id.IHasID;
import com.helger.commons.lang.EnumHelper;
import com.helger.commons.text.display.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);
}
}