public class CalendarCollection extends AbstractList<Calendar>
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.
|
int |
getCount()
Deprecated.
Use size() instead.
|
Project |
getParentProject()
Returns 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()
Returns the number of objects contained in this
CalendarCollection object. |
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, sort, spliterator, toArray, toArray
parallelStream, removeIf, stream
public void clear()
clear
in interface Collection<Calendar>
clear
in interface List<Calendar>
clear
in class AbstractList<Calendar>
@Deprecated public int getCount()
Returns the number of objects contained in this CalendarCollection
object.
Read only int
.
public Calendar get(int index)
public Calendar remove(int index)
public Iterator<Calendar> iterator()
public Project getParentProject()
Returns a parent Project
of this object.
Read only Project
.
public 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
- is thrown if calendar name is null or empty.public 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 Calendar getByName(String name)
Returns a calendar with the specified name.
name
- Name of a calendar.public Calendar getByUid(int uid)
Returns a calendar with the specified Uid.
uid
- Uid of a calendar.public Calendar set(int index, Calendar element)
public 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
- is thrown when trying to remove standard calendar.public int size()
Returns the number of objects contained in this CalendarCollection
object.
Read only int
.
size
in interface Collection<Calendar>
size
in interface List<Calendar>
size
in class AbstractCollection<Calendar>
Copyright (c) 2008-2018 Aspose Pty Ltd. All Rights Reserved.