com.aspose.email
Class ByNumberCollection

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.ArrayList<Integer>
              extended by com.aspose.email.ByNumberCollection
All Implemented Interfaces:
Serializable, Cloneable, Iterable<Integer>, Collection<Integer>, List<Integer>, RandomAccess

public class ByNumberCollection
extends ArrayList<Integer>

Represents a set of months, weeks, days, hours, minutes or seconds in a recurrence rule.


Corresponds to various BYXXX parts such as BYDAY, BYMONTH of a recurrence rule. Most of the ByXXX properties of RecurrenceRule are implemented as ByNumberCollection.

See Also:
Serialized Form

Method Summary
 boolean add(int value)
           Adds a month, week, day, hour, minute or second to the collection.
 void add(int[] values)
           Adds an array of month, week, day, hour, minute or second to the collection.
 boolean contains(int value)
           Determines whether the value is in the collection.
 boolean equals(ByNumberCollection other)
           
 boolean equals(Object obj)
           
 Integer get(int index)
           Gets or sets a value in the collection at the specified position.
 int hashCode()
           
 void set(int index, int value)
           
 void sort()
           Sorts the elements in the collection.
 
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, indexOf, isEmpty, lastIndexOf, remove, remove, set, size, toArray, toArray, trimToSize
 
Methods inherited from class java.util.AbstractList
iterator, listIterator, listIterator, subList
 
Methods inherited from class java.util.AbstractCollection
containsAll, removeAll, retainAll, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
containsAll, iterator, listIterator, listIterator, removeAll, retainAll, subList
 

Method Detail

add

public boolean add(int value)

Adds a month, week, day, hour, minute or second to the collection.

Parameters:
value - The value to add.


Throws an exception if the value is outside of the valid range for the time unit of this collection.

Returns:
The zero-based index of the newly added item.

add

public void add(int[] values)

Adds an array of month, week, day, hour, minute or second to the collection.

Parameters:
values - The values.

contains

public boolean contains(int value)

Determines whether the value is in the collection.

Parameters:
value - The value to find.
Returns:
True, if the specified value was found in the collection.

sort

public void sort()

Sorts the elements in the collection.


get

public Integer get(int index)

Gets or sets a value in the collection at the specified position.

Specified by:
get in interface List<Integer>
Overrides:
get in class ArrayList<Integer>

set

public void set(int index,
                int value)

equals

public boolean equals(ByNumberCollection other)

equals

public boolean equals(Object obj)
Specified by:
equals in interface Collection<Integer>
Specified by:
equals in interface List<Integer>
Overrides:
equals in class AbstractList<Integer>

hashCode

public int hashCode()
Specified by:
hashCode in interface Collection<Integer>
Specified by:
hashCode in interface List<Integer>
Overrides:
hashCode in class AbstractList<Integer>


Copyright (c) 2002-2011 Aspose Pty Ltd. All Rights Reserved.