public class ObjectNumber extends StringBasedErpType<ObjectNumber>
Modifier and Type | Class and Description |
---|---|
static class |
ObjectNumber.ObjectNumberType
An enum representing the source, from which the
ObjectNumber was created. |
StringBasedErpType.CharCasing, StringBasedErpType.FillCharStrategy
Modifier and Type | Field and Description |
---|---|
static ObjectNumber |
EMPTY
An empty, uninitialized
ObjectNumber . |
Constructor and Description |
---|
ObjectNumber(ControllingArea controllingArea,
CostCenter costCenter)
Constructs an object number for a controlling area and cost center.
|
ObjectNumber(ControllingArea controllingArea,
ProfitCenter profitCenter)
Constructs an object number for a profit center.
|
ObjectNumber(InternalOrder internalOrder)
Constructs an object number for an internal order.
|
ObjectNumber(String value)
Constructs an object number based on the given String.
|
Modifier and Type | Method and Description |
---|---|
com.google.common.base.Optional<ControllingArea> |
getControllingArea()
Getter wrapping the contained
ControllingArea into an Optional . |
com.google.common.base.Optional<CostCenter> |
getCostCenter()
Getter wrapping the contained
CostCenter into an Optional . |
StringBasedErpType.FillCharStrategy |
getFillCharStrategy() |
com.google.common.base.Optional<InternalOrder> |
getInternalOrder()
Getter wrapping the contained
InternalOrder into an Optional . |
int |
getMaxLength() |
ObjectNumber.ObjectNumberType |
getObjectNumberType() |
com.google.common.base.Optional<ProfitCenter> |
getProfitCenter()
Getter wrapping the contained
ProfitCenter into an Optional . |
Class<ObjectNumber> |
getType() |
ErpTypeConverter<ObjectNumber> |
getTypeConverter() |
static ObjectNumber |
of(String value)
Transforms the given String to an
ObjectNumber instance. |
static Set<ObjectNumber> |
toObjectNumbers(Collection<String> values)
Transforms the given collection of Strings into a set of
ObjectNumber s by using an
ObjectNumberConverter . |
static Set<String> |
toStrings(Collection<? extends ObjectNumber> values)
Transforms the given collection of
ObjectNumber s into a set of String s by using an
ObjectNumberConverter . |
compareTo, equals, getFillChar, getKeyAsString, getValue, hashCode, isDefault, isEmpty, toString, toString, transformToString, transformToType
public static final ObjectNumber EMPTY
ObjectNumber
.public ObjectNumber(String value) throws IllegalArgumentException
value
- The String to create the ObjectNumber
for.IllegalArgumentException
- If the given String cannot be converted to an ObjectNumber
.public ObjectNumber(ControllingArea controllingArea, CostCenter costCenter) throws IllegalArgumentException
controllingArea
- The ControllingArea
the CostCenter
is assigned to.costCenter
- The CostCenter
to create the ObjectNumber
for.IllegalArgumentException
- If the given ControllingArea
and CostCenter
cannot be converted to an
ObjectNumber
.public ObjectNumber(ControllingArea controllingArea, ProfitCenter profitCenter) throws IllegalArgumentException
controllingArea
- The ControllingArea
the ProfitCenter
is assigned to.profitCenter
- The ProfitCenter
to create the ObjectNumber
for.IllegalArgumentException
- If the given ControllingArea
and ProfitCenter
cannot be converted to an
ObjectNumber
.public ObjectNumber(InternalOrder internalOrder) throws IllegalArgumentException
internalOrder
- The InternalOrder
to create the ObjectNumber
for.IllegalArgumentException
- If the given InternalOrder
cannot be converted to an ObjectNumber
.@Contract(value="null -> null") @Nullable public static ObjectNumber of(@Nullable String value) throws IllegalArgumentException
ObjectNumber
instance. This is null-safe, so if value
is
null
, this method also returns null
.value
- The String to transform.ObjectNumber
based on the given String, or null
, if the String is null
.IllegalArgumentException
- If the given String cannot be converted to an ObjectNumber
.public com.google.common.base.Optional<ControllingArea> getControllingArea()
ControllingArea
into an Optional
.Optional
containing the ControllingArea
.public com.google.common.base.Optional<CostCenter> getCostCenter()
CostCenter
into an Optional
.Optional
containing the CostCenter
.public com.google.common.base.Optional<InternalOrder> getInternalOrder()
InternalOrder
into an Optional
.Optional
containing the InternalOrder
.public com.google.common.base.Optional<ProfitCenter> getProfitCenter()
ProfitCenter
into an Optional
.Optional
containing the ProfitCenter
.public ErpTypeConverter<ObjectNumber> getTypeConverter()
public Class<ObjectNumber> getType()
getType
in class StringBasedErpType<ObjectNumber>
public final int getMaxLength()
getMaxLength
in class StringBasedErpType<ObjectNumber>
public final StringBasedErpType.FillCharStrategy getFillCharStrategy()
getFillCharStrategy
in class StringBasedErpType<ObjectNumber>
public static Set<ObjectNumber> toObjectNumbers(Collection<String> values)
ObjectNumber
s by using an
ObjectNumberConverter
.values
- The String values to transform.Set
containing the created ObjectNumber
spublic static Set<String> toStrings(Collection<? extends ObjectNumber> values)
ObjectNumber
s into a set of String
s by using an
ObjectNumberConverter
.values
- The ObjectNumber
s to transform.Set
containing the created Strings.public ObjectNumber.ObjectNumberType getObjectNumberType()
Copyright © 2018 SAP SE. All rights reserved.