com.f1j.ss.datarange
Interface SectionSet


public interface SectionSet
extends AbstractSection

This interafce represents a set of one or more sections specified in a Range, on either the row or the column axis. The Range contains exactly two SectionSet objects, which are accessed using the Range.getColSet() and Range.getRowSet() methods.

The sections represented by this interface are specified by calling the Range.setSection(com.f1j.ss.datarange.Section, boolean) and Range.setExtent(com.f1j.ss.datarange.Section) methods. It represents the set of sections as an array of getSectionCount() elements. However, the sections actually specified through setSection and setExtent may not be directly accessible through this interface. The reason for this is that the set must consist only of contiguous siblings. Therefore, if the base and extent are not siblings, the section hierarchy will be searched for their common ancestry.

Since:
12.0
See Also:
Range.getColSet(), Range.getRowSet()

Method Summary
 Section getBase()
          Returns the starting section of this section set.
 Section getExtent()
          Returns the section at the extent of this section set.
 Section getSection(int index)
          Returns one of the sections directly represented by this object.
 int getSectionCount()
          Indicates the number of sections directly represented by this object.
 
Methods inherited from interface com.f1j.ss.datarange.AbstractSection
createParent, delete, getEnd, getParent, getSize, getStart, insertAfter, insertBefore, isDeleted, isInRowArea, isLeaf, isRoot, remove
 
Methods inherited from interface com.f1j.util.Lockable
getLock, releaseLock
 

Method Detail

getBase

public Section getBase()
Returns the starting section of this section set. This is the section specified in a call to Range.setSection(com.f1j.ss.datarange.Section, boolean).
Returns:
Starting section of section set
Since:
12.0
See Also:
Range.setSection(com.f1j.ss.datarange.Section, boolean)

getExtent

public Section getExtent()
Returns the section at the extent of this section set. This is the section specified in a call to Range.setExtent(com.f1j.ss.datarange.Section).
Returns:
Section at the extent of section set
Since:
12.0
See Also:
Range.setExtent(com.f1j.ss.datarange.Section)

getSection

public Section getSection(int index)
                   throws com.f1j.util.InvalidIndexException
Returns one of the sections directly represented by this object.
Parameters:
index - The index of the section to return.
Returns:
One of the sections directly represented by this object
Throws:
com.f1j.util.InvalidIndexException - if index is invalid.
Since:
12.0
See Also:
getSectionCount()

getSectionCount

public int getSectionCount()
Indicates the number of sections directly represented by this object.
Returns:
Number of sections in the set
Since:
12.0
See Also:
getSection(int)