public class FloatMoneyVector extends AbstractFloatVectorRel<MoneyUnit,FloatMoneyVector,MutableFloatMoneyVector,FloatMoney>
Copyright (c) 2013-2019 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
AbstractFloatVectorRel.Itrdata| Constructor and Description |
|---|
FloatMoneyVector(float[] values,
MoneyUnit unit,
StorageType storageType)
Construct a new Relative Immutable Float FloatMoneyVector.
|
FloatMoneyVector(FloatMoney[] values,
StorageType storageType)
Construct a new Relative Immutable Float FloatMoneyVector.
|
FloatMoneyVector(FloatVectorData data,
MoneyUnit unit) |
FloatMoneyVector(List<Float> values,
MoneyUnit unit,
StorageType storageType)
Construct a new Relative Immutable Float FloatMoneyVector.
|
FloatMoneyVector(List<FloatMoney> values,
StorageType storageType)
Construct a new Relative Immutable Float FloatMoneyVector.
|
FloatMoneyVector(SortedMap<Integer,Float> values,
MoneyUnit unit,
int length,
StorageType storageType)
Construct a new Relative Immutable Float FloatMoneyVector.
|
FloatMoneyVector(SortedMap<Integer,FloatMoney> values,
int length,
StorageType storageType)
Construct a new Relative Immutable Float FloatMoneyVector.
|
| Modifier and Type | Method and Description |
|---|---|
protected MutableFloatMoneyVector |
instantiateMutableType(FloatVectorData dvd,
MoneyUnit unit)
Construct a new Relative Mutable FloatVector of the right type.
|
protected FloatMoney |
instantiateScalar(float value,
MoneyUnit unit)
Construct a new Relative Immutable FloatScalar of the right type.
|
protected FloatMoneyVector |
instantiateType(FloatVectorData dvd,
MoneyUnit unit)
Construct a new Relative Immutable FloatVector of the right type.
|
FloatMoney[] |
toArray()
Return an array of FloatMoney Scalars from this vector.
|
FloatMoneyVector |
toDense()
return a dense version of this vector.
|
FloatMoneyVector |
toSparse()
return a sparse version of this vector.
|
checkUnit, checkUnit, checkUnit, divide, get, iterator, minus, mutable, plus, timescardinality, checkIndex, checkSize, checkSize, equals, getData, getInUnit, getInUnit, getSI, getStorageType, getValuesInUnit, getValuesInUnit, getValuesSI, hashCode, size, toString, toString, toString, toString, zSumexpressAsSIUnit, expressAsSpecifiedUnit, getUnit, isAbsolute, isRelative, setDisplayUnitclone, finalize, getClass, notify, notifyAll, wait, wait, waitforEach, spliteratorpublic FloatMoneyVector(float[] values,
MoneyUnit unit,
StorageType storageType)
throws ValueException
values - float[]; the values of the entries in the new Relative Immutable Float FloatMoneyVectorunit - MoneyUnit; the unit of the new Relative Immutable Float FloatMoneyVectorstorageType - StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException - when values is nullpublic FloatMoneyVector(List<Float> values, MoneyUnit unit, StorageType storageType) throws ValueException
values - List<Float>; the values of the entries in the new Relative Immutable Float FloatMoneyVectorunit - MoneyUnit; the unit of the new Relative Immutable Float FloatMoneyVectorstorageType - StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException - when values is nullpublic FloatMoneyVector(FloatMoney[] values, StorageType storageType) throws ValueException
values - FloatMoney[]; the values of the entries in the new Relative Immutable Float FloatMoneyVectorstorageType - StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException - when values has zero entriespublic FloatMoneyVector(List<FloatMoney> values, StorageType storageType) throws ValueException
values - List<FloatMoney>; the values of the entries in the new Relative Immutable Float FloatMoneyVectorstorageType - StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException - when values has zero entriespublic FloatMoneyVector(SortedMap<Integer,FloatMoney> values, int length, StorageType storageType) throws ValueException
values - SortedMap<Integer, FloatMoney>; the values of the entries in the new Relative Sparse Mutable Float
FloatMoneyVectorlength - int; the size of the vectorstorageType - StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException - when values has zero entriespublic FloatMoneyVector(SortedMap<Integer,Float> values, MoneyUnit unit, int length, StorageType storageType) throws ValueException
values - SortedMap<Integer, Float>; the map of indexes to values of the Relative Sparse Mutable Float
FloatMoneyVectorunit - MoneyUnit; the unit of the new Relative Sparse Mutable Float FloatMoneyVectorlength - int; the size of the vectorstorageType - StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException - when values is nullFloatMoneyVector(FloatVectorData data, MoneyUnit unit)
data - FloatVectorData; an internal data objectunit - MoneyUnit; the unitprotected final FloatMoneyVector instantiateType(FloatVectorData dvd, MoneyUnit unit)
instantiateType in class AbstractFloatVectorRel<MoneyUnit,FloatMoneyVector,MutableFloatMoneyVector,FloatMoney>dvd - FloatVectorData; an internal data objectunit - U; the unitprotected final MutableFloatMoneyVector instantiateMutableType(FloatVectorData dvd, MoneyUnit unit)
instantiateMutableType in class AbstractFloatVectorRel<MoneyUnit,FloatMoneyVector,MutableFloatMoneyVector,FloatMoney>dvd - FloatVectorData; an internal data objectunit - U; the unitprotected final FloatMoney instantiateScalar(float value, MoneyUnit unit)
instantiateScalar in class AbstractFloatVectorRel<MoneyUnit,FloatMoneyVector,MutableFloatMoneyVector,FloatMoney>value - float; the valueunit - U; the unitpublic final FloatMoneyVector toDense()
public final FloatMoneyVector toSparse()
public FloatMoney[] toArray()
RuntimeException - wrapping a ValueException on error getting one of the valuesCopyright © 2015–2019 Delft University of Technology. All rights reserved.