eu.etaxonomy.cdm.model.common
Class OrderedTermBase<T extends OrderedTermBase>
java.lang.Object
eu.etaxonomy.cdm.model.common.CdmBase
eu.etaxonomy.cdm.model.common.VersionableEntity
eu.etaxonomy.cdm.model.common.AnnotatableEntity
eu.etaxonomy.cdm.model.common.IdentifiableEntity
eu.etaxonomy.cdm.model.common.TermBase
eu.etaxonomy.cdm.model.common.DefinedTermBase<T>
eu.etaxonomy.cdm.model.common.OrderedTermBase<T>
- All Implemented Interfaces:
- IAnnotatableEntity, ICdmBase, IDefinedTerm<T>, IIdentifiableEntity, ILoadableTerm<T>, ISourceable<IdentifiableSource>, IVersionableEntity, Serializable, Cloneable, Comparable<T>
- Direct Known Subclasses:
- Modifier, NamedArea, NamedAreaLevel, NomenclaturalStatusType, PresenceAbsenceTermBase, Rank, RelationshipTermBase, State, TypeDesignationStatusBase
@Indexed(index="eu.etaxonomy.cdm.model.common.DefinedTermBase")
public abstract class OrderedTermBase<T extends OrderedTermBase>
- extends DefinedTermBase<T>
- implements Comparable<T>
- Version:
- 1.0
- Author:
- m.doering
- See Also:
- Serialized Form
| Fields inherited from class eu.etaxonomy.cdm.model.common.CdmBase |
uuid |
|
Method Summary |
Object |
clone()
Clones this OrderedTermBase. |
int |
compareTo(T orderedTerm)
Compares this OrderedTermBase with the specified OrderedTermBase for
order. |
protected boolean |
decreaseIndex(OrderedTermVocabulary<T> vocabulary)
Deprecated. To be used only by OrderedTermVocabulary |
boolean |
equals(Object object)
Is true if UUID and created timestamp are the same for the passed Object and this one. |
int |
getOrderIndex()
Higher ordered terms have a lower order index,
lower ordered terms have a higher order index: |
protected boolean |
incrementIndex(OrderedTermVocabulary<T> vocabulary)
Deprecated. To be used only by OrderedTermVocabulary |
boolean |
isHigher(T orderedTerm)
If this term is higher than the parameter term, true is returned, else false. |
boolean |
isLower(T orderedTerm)
If this term is lower than the parameter term, true is returned, else false. |
protected int |
performCompareTo(T orderedTerm,
boolean skipVocabularyCheck)
Compares this OrderedTermBase with the specified OrderedTermBase for
order. |
| Methods inherited from class eu.etaxonomy.cdm.model.common.DefinedTermBase |
addGeneralizationOf, addIncludes, addMedia, getByUuid, getGeneralizationOf, getIncludes, getKindOf, getMedia, getPartOf, getVocabulary, readCsvLine, readCsvLine, removeGeneralization, removeIncludes, removeMedia, resetTerms, setDefaultTerms, setGeneralizationOf, setIncludes, setKindOf, setPartOf, setVocabulary, writeCsvLine |
| Methods inherited from class eu.etaxonomy.cdm.model.common.TermBase |
addRepresentation, getDescription, getDescription, getLabel, getLabel, getPreferredRepresentation, getPreferredRepresentation, getRepresentation, getRepresentations, getUri, removeRepresentation, setLabel, setLabel, setUri, toString |
| Methods inherited from class eu.etaxonomy.cdm.model.common.IdentifiableEntity |
addCredit, addCredit, addExtension, addExtension, addRights, addSource, addSource, compareTo, generateTitle, getCacheStrategy, getCredits, getCredits, getData, getExtensions, getExtensions, getExtensions, getLsid, getRights, getSources, getTitleCache, getTruncatedCache, initListener, isProtectedTitleCache, removeCredit, removeCredit, removeExtension, removeRights, removeSource, setCacheStrategy, setLsid, setProtectedTitleCache, setTitleCache, setTitleCache |
| Methods inherited from class eu.etaxonomy.cdm.model.common.CdmBase |
addPropertyChangeListener, addPropertyChangeListener, clone, deproxy, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getCreated, getCreatedBy, getId, getUuid, hashCode, hasListeners, invokeSetMethod, invokeSetMethodWithNull, isInstanceOf, removePropertyChangeListener, removePropertyChangeListener, setCreated, setCreatedBy, setId, setUuid |
orderIndex
protected int orderIndex
OrderedTermBase
public OrderedTermBase()
OrderedTermBase
public OrderedTermBase(String term,
String label,
String labelAbbrev)
getOrderIndex
public int getOrderIndex()
- Higher ordered terms have a lower order index,
lower ordered terms have a higher order index:
a.oderIndex < b.oderIndex : a > b
- Returns:
- the order index of a term
compareTo
public int compareTo(T orderedTerm)
- Compares this OrderedTermBase with the specified OrderedTermBase for
order. Returns a negative integer, zero, or a positive integer as the
orderId of this object is greater than, equal to, or less than the
specified object. This Integer compare logic of this method is the
inverse logic of the the one implemented in
Comparable.compareTo(java.lang.Object)
- Specified by:
compareTo in interface Comparable<T extends OrderedTermBase>
performCompareTo
protected int performCompareTo(T orderedTerm,
boolean skipVocabularyCheck)
- Compares this OrderedTermBase with the specified OrderedTermBase for
order. Returns a negative integer, zero, or a positive integer as the
orderId of this object is greater than, equal to, or less than the
specified object. This Integer compare logic of this method is the
inverse logic of the the one implemented in
Comparable.compareTo(java.lang.Object)
isLower
public boolean isLower(T orderedTerm)
- If this term is lower than the parameter term, true is returned, else false.
If the parameter term is null, an Exception is thrown.
- Parameters:
orderedTerm -
- Returns:
- boolean result of the comparison
isHigher
public boolean isHigher(T orderedTerm)
- If this term is higher than the parameter term, true is returned, else false.
If the parameter term is null, an Exception is thrown.
- Parameters:
orderedTerm -
- Returns:
- boolean result of the comparison
decreaseIndex
@Deprecated
protected boolean decreaseIndex(OrderedTermVocabulary<T> vocabulary)
- Deprecated. To be used only by OrderedTermVocabulary
incrementIndex
@Deprecated
protected boolean incrementIndex(OrderedTermVocabulary<T> vocabulary)
- Deprecated. To be used only by OrderedTermVocabulary
equals
public boolean equals(Object object)
- Description copied from class:
VersionableEntity
- Is true if UUID and created timestamp are the same for the passed Object and this one.
- Overrides:
equals in class TermBase
- See Also:
See {@link http://www.hibernate.org/109.html hibernate109}, {@link http://www.geocities.com/technofundo/tech/java/equalhash.html geocities}
or {@link http://www.ibm.com/developerworks/java/library/j-jtp05273.html ibm}
for more information about equals and hashcode.
clone
public Object clone()
- Clones this OrderedTermBase. This is a shortcut that enables to create
a new instance that differs only slightly from this OrderedTermBase.
- Overrides:
clone in class DefinedTermBase<T extends OrderedTermBase>
- See Also:
DefinedTermBase.clone(),
Object.clone()
Copyright © 2007-2012 EDIT. All Rights Reserved.