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
Rate
objects.
-
-
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 Rate
add(Date ratesFrom)
Adds a newRate
instance to this collection.Rate
add(Date ratesFrom, int type)
Adds a newRate
instance to this collection.void
clear()
Set<Map.Entry<Integer,RateByDateCollection>>
entrySet()
(@inheritDoc}RateByDateCollection
get(Object key)
(@inheritDoc}RateByDateCollection
getByRateType(int key)
Returns the element at the specified index.Resource
getParentResource()
Gets the parentResource
object for this collection.boolean
isReadOnly()
Gets a value indicating whether this collection is read only.com.aspose.ms.System.Collections.IEnumerator
iterator()
Returns an enumerator for this collection.RateByDateCollection
put(Integer key, RateByDateCollection value)
(@inheritDoc}boolean
remove(Rate item)
Removes Rate instance from this collection.void
setByRateType(int key, RateByDateCollection value)
Sets the element at the specified index.int
size()
Gets the number of elements contained in the RateCollection.List<Rate>
toList()
Converts theRateCollection
object to a list ofRate
objects.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
Rate
instance to this collection.- Parameters:
ratesFrom
- The date the new rate comes into effect.- Returns:
- Added
Rate
instance.
-
add
public final Rate add(Date ratesFrom, int type)
Adds a new
Rate
instance to this collection.- Parameters:
ratesFrom
- The date the new rate comes into effect.type
- The rate table to add into.- Returns:
- Added
Rate
instance.
-
clear
public final void clear()
- Specified by:
clear
in interfaceMap<Integer,RateByDateCollection>
- Overrides:
clear
in classAbstractMap<Integer,RateByDateCollection>
-
entrySet
public Set<Map.Entry<Integer,RateByDateCollection>> entrySet()
(@inheritDoc}- Specified by:
entrySet
in interfaceMap<Integer,RateByDateCollection>
- Specified by:
entrySet
in 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
Resource
object for this collection.- Returns:
- the parent
Resource
object 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:
iterator
in 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:
size
in interfaceMap<Integer,RateByDateCollection>
- Overrides:
size
in classAbstractMap<Integer,RateByDateCollection>
- Returns:
- the number of elements contained in the RateCollection.
-
toList
public final List<Rate> toList()
Converts the
RateCollection
object to a list ofRate
objects.- Returns:
- List of
Rate
objects.
-
toList
public final List<Rate> toList(int type)
Converts the
RateCollection
object to a list ofRate
objects filtered by specifiedRateType
type.- Parameters:
type
- The type to filter on.- Returns:
- a list of
Rate
objects.
-
get
public final RateByDateCollection get(Object key)
(@inheritDoc}- Specified by:
get
in interfaceMap<Integer,RateByDateCollection>
- Overrides:
get
in classAbstractMap<Integer,RateByDateCollection>
- Parameters:
key
-- Returns:
-
put
public final RateByDateCollection put(Integer key, RateByDateCollection value)
(@inheritDoc}- Specified by:
put
in interfaceMap<Integer,RateByDateCollection>
- Overrides:
put
in classAbstractMap<Integer,RateByDateCollection>
- Parameters:
key
-value
-- Returns:
-
-