com.atlassian.confluence.util.actions
Class AlphabeticalGroupingSupport

java.lang.Object
  extended by com.atlassian.confluence.util.actions.AlphabeticalGroupingSupport

public class AlphabeticalGroupingSupport
extends java.lang.Object

This class provides support for grouping a collection of data alphabetically. This is used and useful for displaying alphabetically grouped list of pages and labels.

Note: numerics are grouped together into the group 0-9

Note: the extraction of the name of an object from the object is presently hard coded in this class, and only ContentEntityObjects and Labels are reasonably supported.

See Also:
extractFirstCharacter(Object)

Field Summary
static java.lang.String NUMERIC
           
 
Constructor Summary
AlphabeticalGroupingSupport(java.util.Collection c)
           
 
Method Summary
 java.util.List getContents()
          Return all of the content
 java.util.List getContents(char c)
           
 java.util.List getContents(java.lang.String s)
          Return the content that begins with the specified string.
 boolean hasContent(char c)
          Return true if there is content that starts with the specified character
 boolean hasContent(java.lang.String s)
          Return true if there is content that starts with the specified string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NUMERIC

public static final java.lang.String NUMERIC
See Also:
Constant Field Values
Constructor Detail

AlphabeticalGroupingSupport

public AlphabeticalGroupingSupport(java.util.Collection c)
Method Detail

hasContent

public boolean hasContent(char c)
Return true if there is content that starts with the specified character

Parameters:
c -
Returns:

hasContent

public boolean hasContent(java.lang.String s)
Return true if there is content that starts with the specified string.

Parameters:
s -
Returns:

getContents

public java.util.List getContents(char c)

getContents

public java.util.List getContents(java.lang.String s)
Return the content that begins with the specified string.

Parameters:
s -
Returns:

getContents

public java.util.List getContents()
Return all of the content

Returns:


Copyright © 2003-2010 Atlassian. All Rights Reserved.