Package com.aspose.tasks
Class RateCollection
- java.lang.Object
-
- java.util.AbstractMap<Integer,RateByDateCollection>
-
- com.aspose.tasks.RateCollection
-
- All Implemented Interfaces:
Iterable<Map.Entry<Integer,RateByDateCollection>>,Map<Integer,RateByDateCollection>
public class RateCollection extends AbstractMap<Integer,RateByDateCollection> implements Iterable<Map.Entry<Integer,RateByDateCollection>>
Represents a collection which contains
Rateobjects.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object,V extends Object>
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Rateadd(Date ratesFrom)Adds a newRateinstance to this collection.Rateadd(Date ratesFrom, int type)Adds a newRateinstance to this collection.voidclear()Set<Map.Entry<Integer,RateByDateCollection>>entrySet()(@inheritDoc}RateByDateCollectionget(Object key)(@inheritDoc}RateByDateCollectiongetByRateType(int key)Returns the element at the specified index.ResourcegetParentResource()Gets the parentResourceobject for this collection.booleanisReadOnly()Gets a value indicating whether this collection is read only.com.aspose.ms.System.Collections.IEnumeratoriterator()Returns an enumerator for this collection.RateByDateCollectionput(Integer key, RateByDateCollection value)(@inheritDoc}booleanremove(Rate item)Removes Rate instance from this collection.voidsetByRateType(int key, RateByDateCollection value)Sets the element at the specified index.intsize()Gets the number of elements contained in the RateCollection.List<Rate>toList()Converts theRateCollectionobject to a list ofRateobjects.List<Rate>toList(int type)-
Methods inherited from class java.util.AbstractMap
containsKey, containsValue, equals, hashCode, isEmpty, keySet, putAll, remove, toString, values
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
-
-
-
Method Detail
-
add
public final Rate add(Date ratesFrom)
Adds a new
Rateinstance to this collection.- Parameters:
ratesFrom- The date the new rate comes into effect.- Returns:
- Added
Rateinstance.
-
add
public final Rate add(Date ratesFrom, int type)
Adds a new
Rateinstance to this collection.- Parameters:
ratesFrom- The date the new rate comes into effect.type- The rate table to add into.- Returns:
- Added
Rateinstance.
-
clear
public final void clear()
- Specified by:
clearin interfaceMap<Integer,RateByDateCollection>- Overrides:
clearin classAbstractMap<Integer,RateByDateCollection>
-
entrySet
public Set<Map.Entry<Integer,RateByDateCollection>> entrySet()
(@inheritDoc}- Specified by:
entrySetin interfaceMap<Integer,RateByDateCollection>- Specified by:
entrySetin classAbstractMap<Integer,RateByDateCollection>- Returns:
-
getByRateType
public final RateByDateCollection getByRateType(int key)
Returns the element at the specified index.
- Parameters:
key- The zero-based index of the element to get.- Returns:
- the element at the specified index.
-
getParentResource
public final Resource getParentResource()
Gets the parent
Resourceobject for this collection.- Returns:
- the parent
Resourceobject for this collection.
-
isReadOnly
public final boolean isReadOnly()
Gets a value indicating whether this collection is read only.
- Returns:
- a value indicating whether this collection is read only.
-
iterator
public final com.aspose.ms.System.Collections.IEnumerator iterator()
Returns an enumerator for this collection.
- Specified by:
iteratorin interfaceIterable<Map.Entry<Integer,RateByDateCollection>>- Returns:
- an enumerator for this collection.
-
remove
public final boolean remove(Rate item)
Removes Rate instance from this collection.
- Parameters:
item- The item to remove.- Returns:
- true if the specified Rate was removed successfully; otherwise, false.
-
setByRateType
public final void setByRateType(int key, RateByDateCollection value)Sets the element at the specified index.
- Parameters:
key- The zero-based index of the element to set.value- The element to set at the specified index.
-
size
public final int size()
Gets the number of elements contained in the RateCollection.
- Specified by:
sizein interfaceMap<Integer,RateByDateCollection>- Overrides:
sizein classAbstractMap<Integer,RateByDateCollection>- Returns:
- the number of elements contained in the RateCollection.
-
toList
public final List<Rate> toList()
Converts the
RateCollectionobject to a list ofRateobjects.- Returns:
- List of
Rateobjects.
-
toList
public final List<Rate> toList(int type)
Converts the
RateCollectionobject to a list ofRateobjects filtered by specifiedRateTypetype.- Parameters:
type- The type to filter on.- Returns:
- a list of
Rateobjects.
-
get
public final RateByDateCollection get(Object key)
(@inheritDoc}- Specified by:
getin interfaceMap<Integer,RateByDateCollection>- Overrides:
getin classAbstractMap<Integer,RateByDateCollection>- Parameters:
key-- Returns:
-
put
public final RateByDateCollection put(Integer key, RateByDateCollection value)
(@inheritDoc}- Specified by:
putin interfaceMap<Integer,RateByDateCollection>- Overrides:
putin classAbstractMap<Integer,RateByDateCollection>- Parameters:
key-value-- Returns:
-
-