CalendarCollection
Inheritance: java.lang.Object, java.util.AbstractCollection, java.util.AbstractList, com.aspose.tasks.AbstractList
public class CalendarCollection extends AbstractList<Calendar>
Represents a collection of Calendar objects.
Methods
Method | Description |
---|---|
add(String name) | Adds a new base calendar to this CalendarCollection object and returns added calendar. |
add(String name, Calendar baseCalendar) | Adds a new calendar with specified base calendar to this CalendarCollection object and returns added calendar. |
clear() | Removes all of the elements from this collection. |
get(int index) | (@inheritDoc} |
getByName(String name) | Returns a calendar with the specified name. |
getByUid(int uid) | Returns a calendar with the specified UID. |
iterator() | Returns an enumerator for this collection. |
remove(int index) | Removes the element at the specified position in this list. |
remove(Object item) | Removes Calendar from Project CalendarCollection. |
set(int index, Calendar element) | Replaces the element at the specified position in this list with the specified element. |
size() | Gets the number of objects contained in this CalendarCollection object. |
toList() | Converts the CalendarCollection object to a list of Calendar objects. |
add(String name)
public final Calendar add(String name)
Adds a new base calendar to this CalendarCollection object and returns added calendar.
Parameters:
Parameter | Type | Description |
---|---|---|
name | java.lang.String | Calendar name. |
Returns: Calendar - Added Calendar object.
add(String name, Calendar baseCalendar)
public final Calendar add(String name, Calendar baseCalendar)
Adds a new calendar with specified base calendar to this CalendarCollection object and returns added calendar.
Parameters:
Parameter | Type | Description |
---|---|---|
name | java.lang.String | Specified name. |
baseCalendar | Calendar | Specified base calendar. |
Returns: Calendar - Added Calendar object.
clear()
public final void clear()
Removes all of the elements from this collection.
get(int index)
public Calendar get(int index)
(@inheritDoc}
Parameters:
Parameter | Type | Description |
---|---|---|
index | int | {@inheritDoc} |
Returns: Calendar - {@inheritDoc}
getByName(String name)
public final Calendar getByName(String name)
Returns a calendar with the specified name.
Parameters:
Parameter | Type | Description |
---|---|---|
name | java.lang.String | Name of a calendar. |
Returns: Calendar - If found returns calendar with a specified name else returns null.
getByUid(int uid)
public final Calendar getByUid(int uid)
Returns a calendar with the specified UID.
Parameters:
Parameter | Type | Description |
---|---|---|
uid | int | UID of a calendar. |
Returns: Calendar - Calendar with a specified UID.
iterator()
public Iterator<Calendar> iterator()
Returns an enumerator for this collection.
Returns: java.util.Iterator<com.aspose.tasks.Calendar> - an enumerator for this collection.
remove(int index)
public Calendar remove(int index)
Removes the element at the specified position in this list.
Parameters:
Parameter | Type | Description |
---|---|---|
index | int | {@inheritDoc} |
Returns: Calendar - {@inheritDoc}
remove(Object item)
public final boolean remove(Object item)
Removes Calendar from Project CalendarCollection.
Parameters:
Parameter | Type | Description |
---|---|---|
item | java.lang.Object | The calendar to remove. |
Returns: boolean - If removed returns true, else returns false.
set(int index, Calendar element)
public Calendar set(int index, Calendar element)
Replaces the element at the specified position in this list with the specified element.
Parameters:
Parameter | Type | Description |
---|---|---|
index | int | {@inheritDoc} |
element | Calendar | {@inheritDoc} |
Returns: Calendar - {@inheritDoc}
size()
public final int size()
Gets the number of objects contained in this CalendarCollection object.
Returns: int - the number of objects contained in this CalendarCollection object.
toList()
public final List<Calendar> toList()
Converts the CalendarCollection object to a list of Calendar objects.
Returns: java.util.List<com.aspose.tasks.Calendar> - List of Calendar objects.