public class CalendarCollection extends AbstractList<T>
Represents a collection of Calendar
objects.
Modifier and Type | Method and Description |
---|---|
Calendar |
add(String name)
Adds a new base calendar to this CalendarCollection object and returns added calendar.
|
Calendar |
add(String name,
Calendar baseCalendar)
Adds a new calendar with specified base calendar to this CalendarCollection object and returns added calendar.
|
void |
clear()
Removes all of the elements from this collection.
|
Calendar |
get(int index)
(@inheritDoc}
|
Calendar |
getByName(String name)
Returns a calendar with the specified name.
|
Calendar |
getByUid(int uid)
Returns a calendar with the specified UID.
|
Project |
getParentProject()
Gets a parent
Project of this object. |
Iterator<Calendar> |
iterator()
Returns an iterator over elements from this collection.
|
Calendar |
remove(int index)
Removes the element at the specified position in this list.
|
boolean |
remove(Object object)
Removes Calendar from Project CalendarCollection.
|
Calendar |
set(int index,
Calendar element)
Replaces the element at the specified position in this list with the specified element.
|
int |
size()
Gets the number of objects contained in this
CalendarCollection object. |
void |
sort(Comparator<? super T> c) |
List<Calendar> |
toList()
Converts the CalendarCollection object to a list of
Calendar objects. |
add, add, addAll, equals, hashCode, indexOf, lastIndexOf, listIterator, listIterator, subList
addAll, contains, containsAll, isEmpty, removeAll, retainAll, toArray, toArray, toString
addAll, contains, containsAll, isEmpty, removeAll, replaceAll, retainAll, spliterator, toArray, toArray
parallelStream, removeIf, stream
public final Calendar add(String name)
Adds a new base calendar to this CalendarCollection object and returns added calendar.
name
- Calendar name.Calendar
object.com.aspose.ms.System.ArgumentException
- Thrown when calendar name is null.public final Calendar add(String name, Calendar baseCalendar)
Adds a new calendar with specified base calendar to this CalendarCollection object and returns added calendar.
name
- Specified name.baseCalendar
- Specified base calendar.Calendar
object.public final void clear()
clear
in interface Collection<Calendar>
clear
in interface List<Calendar>
clear
in class AbstractList<Calendar>
public Calendar get(int index)
public final Calendar getByName(String name)
Returns a calendar with the specified name.
name
- Name of a calendar.public final Calendar getByUid(int uid)
Returns a calendar with the specified UID.
uid
- UID of a calendar.public Iterator<Calendar> iterator()
public Calendar remove(int index)
public final boolean remove(Object object)
Removes Calendar from Project CalendarCollection.
remove
in interface Collection<Calendar>
remove
in interface List<Calendar>
remove
in class AbstractCollection<Calendar>
object
- Calendar
instance to remove.com.aspose.ms.System.InvalidOperationException
- Thrown when calendar cannot be removed.public Calendar set(int index, Calendar element)
public final int size()
size
in interface Collection<Calendar>
size
in interface List<Calendar>
size
in class AbstractCollection<Calendar>
CalendarCollection
object.public final List<Calendar> toList()
Converts the CalendarCollection object to a list of Calendar
objects.
Calendar
objects.public void sort(Comparator<? super T> c)
c
-