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

MethodDescription
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:

ParameterTypeDescription
namejava.lang.StringCalendar 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:

ParameterTypeDescription
namejava.lang.StringSpecified name.
baseCalendarCalendarSpecified 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:

ParameterTypeDescription
indexint{@inheritDoc}

Returns: Calendar - {@inheritDoc}

getByName(String name)

public final Calendar getByName(String name)

Returns a calendar with the specified name.

Parameters:

ParameterTypeDescription
namejava.lang.StringName 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:

ParameterTypeDescription
uidintUID 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:

ParameterTypeDescription
indexint{@inheritDoc}

Returns: Calendar - {@inheritDoc}

remove(Object item)

public final boolean remove(Object item)

Removes Calendar from Project CalendarCollection.

Parameters:

ParameterTypeDescription
itemjava.lang.ObjectThe 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:

ParameterTypeDescription
indexint{@inheritDoc}
elementCalendar{@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.