Class AbstractCodeTemplate
java.lang.Object
org.fife.ui.rsyntaxtextarea.templates.AbstractCodeTemplate
- All Implemented Interfaces:
Serializable,Cloneable,Comparable<CodeTemplate>,CodeTemplate
- Direct Known Subclasses:
StaticCodeTemplate
A base class to build code templates on top of.
- Version:
- 1.0
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionThis no-arg constructor is required for serialization purposes.Creates a new template. -
Method Summary
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.fife.ui.rsyntaxtextarea.templates.CodeTemplate
invoke
-
Field Details
-
id
The ID of this template.
-
-
Constructor Details
-
AbstractCodeTemplate
public AbstractCodeTemplate()This no-arg constructor is required for serialization purposes. -
AbstractCodeTemplate
Creates a new template.- Parameters:
id- The ID for this template.- Throws:
IllegalArgumentException- Ifidisnull.
-
-
Method Details
-
clone
Creates a deep copy of this template.- Specified by:
clonein interfaceCodeTemplate- Overrides:
clonein classObject- Returns:
- A deep copy of this template.
-
compareTo
Compares theStaticCodeTemplateto another.- Specified by:
compareToin interfaceComparable<CodeTemplate>- Parameters:
o- AnotherStaticCodeTemplateobject.- Returns:
- A negative integer, zero, or a positive integer as this object is less than, equal-to, or greater than the passed-in object.
- Throws:
ClassCastException- Ifois not an instance ofCodeTemplate.
-
equals
-
getID
Returns the ID of this code template.- Specified by:
getIDin interfaceCodeTemplate- Returns:
- The template's ID.
- See Also:
-
hashCode
public int hashCode()Returns the hash code for this template. -
setID
Sets the ID for this template.- Parameters:
id- The ID for this template.- Throws:
IllegalArgumentException- Ifidisnull.- See Also:
-