edu.northwestern.at.monk.model
Class TenseCategory

java.lang.Object
  extended by edu.northwestern.at.monk.model.TaggedObject
      extended by edu.northwestern.at.monk.model.CoreObject
          extended by edu.northwestern.at.monk.model.TenseCategory
All Implemented Interfaces:
Feature, java.lang.Comparable<TenseCategory>

public class TenseCategory
extends CoreObject
implements Feature, java.lang.Comparable<TenseCategory>

A tense part of speech category.

See Also:
MONK Datastore Overview, Licensing Agreement

Nested Class Summary
static class TenseCategory.Comparator
          A multi-column tense category comparator.
static class TenseCategory.SortOption
          Tense category sorting options.
 
Method Summary
static int compare(TenseCategory cat1, TenseCategory cat2)
          Compares two tense categories with null values permitted.
 int compareTo(TenseCategory other)
          Compares this instance with another.
static java.util.Collection<TenseCategory> find(java.util.Collection<SearchCriterion> criteria)
          Finds tense categories.
static java.util.Collection<TenseCategory> find(SearchCriteria criteria)
          Finds tense categories.
static java.util.Collection<TenseCategory> find(SearchCriterion... criteria)
          Finds tense categories.
static TenseCategory get(java.lang.String tag)
          Gets a tense category by tag.
static java.util.Collection<TenseCategory> getAll()
          Gets all the tense categories.
static TenseCategory[] sort(java.util.Collection<TenseCategory> collection, TenseCategory.SortOption... options)
          Sorts a collection of tense categories.
static void sort(TenseCategory[] array, TenseCategory.SortOption... options)
          Sorts an array of tense categories.
 
Methods inherited from class edu.northwestern.at.monk.model.TaggedObject
getTag
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

get

public static TenseCategory get(java.lang.String tag)
Gets a tense category by tag.

Parameters:
tag - Tag.
Returns:
Tense category, or null if none.

getAll

public static java.util.Collection<TenseCategory> getAll()
Gets all the tense categories.

Returns:
Unmodifiable collection of all the tense categories in case and diacritical-insensitive alphabetical order by tag.

find

public static java.util.Collection<TenseCategory> find(SearchCriterion... criteria)
                                                throws ModelException
Finds tense categories.

Parameters:
criteria - Search criteria.
Returns:
Collection of tense categories, in an undefined order. If you want the result to be ordered, you must call a sort method.
Throws:
ModelException -
Unable to execute search

find

public static java.util.Collection<TenseCategory> find(java.util.Collection<SearchCriterion> criteria)
                                                throws ModelException
Finds tense categories.

Parameters:
criteria - Collection of search criteria.
Returns:
Collection of tense categories, in an undefined order. If you want the result to be ordered, you must call a sort method.
Throws:
ModelException -
Unable to execute search

find

public static java.util.Collection<TenseCategory> find(SearchCriteria criteria)
                                                throws ModelException
Finds tense categories.

Parameters:
criteria - Search criteria.
Returns:
Collection of tense categories, in an undefined order. If you want the result to be ordered, you must call a sort method.
Throws:
ModelException -
Unable to execute search

sort

public static void sort(TenseCategory[] array,
                        TenseCategory.SortOption... options)
Sorts an array of tense categories.

Parameters:
array - Array of tense categories.
options - Sort options, or null to use the natural ordering.

sort

public static TenseCategory[] sort(java.util.Collection<TenseCategory> collection,
                                   TenseCategory.SortOption... options)
Sorts a collection of tense categories.

Parameters:
collection - Collection of tense categories.
options - Sort options, or null to use the natural ordering.
Returns:
Sorted array of tense categories.

compare

public static int compare(TenseCategory cat1,
                          TenseCategory cat2)
Compares two tense categories with null values permitted.

Tense categories are ordered in case and diacritical-insensitve increasing alphabetical order by tag. Null values are equal to each other but greater than all other values.

Parameters:
cat1 - First tense category.
cat2 - Second tense category.
Returns:
A negative integer, zero, or a positive integer as this instance is less than, equal to, or greater than the specified instance.

compareTo

public int compareTo(TenseCategory other)
Compares this instance with another.

Tense categories are ordered in case and diacritical-insensitve increasing alphabetical order by tag.

Specified by:
compareTo in interface java.lang.Comparable<TenseCategory>
Parameters:
other - The other instance to be compared.
Returns:
A negative integer, zero, or a positive integer as this instance is less than, equal to, or greater than the specified instance.