org.pentaho.di.ui.i18n
Class KeyOccurrence

java.lang.Object
  extended by org.pentaho.di.ui.i18n.KeyOccurrence
All Implemented Interfaces:
Comparable<KeyOccurrence>

public class KeyOccurrence
extends Object
implements Comparable<KeyOccurrence>

Contains the occurrence of a key in a java source code file

Since:
2007-09-29
Author:
matt

Constructor Summary
KeyOccurrence()
           
KeyOccurrence(org.apache.commons.vfs.FileObject fileObject, String messagesPackage, int row, int column, String key, String arguments, String sourceLine)
           
 
Method Summary
 int compareTo(KeyOccurrence occ)
           
 boolean equals(Object occ)
           
 String getArguments()
           
 int getColumn()
           
 org.apache.commons.vfs.FileObject getFileObject()
           
 String getKey()
           
 String getMessagesPackage()
           
 int getOccurrences()
           
 int getRow()
           
 String getSourceLine()
           
 void incrementOccurrences()
          Increment the number of occurrences with one.
 void setArguments(String arguments)
           
 void setColumn(int column)
           
 void setFileObject(org.apache.commons.vfs.FileObject fileObject)
           
 void setKey(String key)
           
 void setMessagesPackage(String messagesPackage)
           
 void setOccurrences(int occurrences)
           
 void setRow(int row)
           
 void setSourceLine(String sourceLine)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

KeyOccurrence

public KeyOccurrence()

KeyOccurrence

public KeyOccurrence(org.apache.commons.vfs.FileObject fileObject,
                     String messagesPackage,
                     int row,
                     int column,
                     String key,
                     String arguments,
                     String sourceLine)
Parameters:
fileObject - The java source file
messagesPackage - The location of the messages file, derived from "^import .*Messages;"
row - The row on which the occurrence takes place
column - The column on which the occurrence takes place
key - The i18n key
arguments - The arguments from the source code
Method Detail

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object occ)
Overrides:
equals in class Object

compareTo

public int compareTo(KeyOccurrence occ)
Specified by:
compareTo in interface Comparable<KeyOccurrence>

getFileObject

public org.apache.commons.vfs.FileObject getFileObject()
Returns:
The java source file

setFileObject

public void setFileObject(org.apache.commons.vfs.FileObject fileObject)
Parameters:
fileObject - The java source file

getMessagesPackage

public String getMessagesPackage()
Returns:
The location of the messages file

setMessagesPackage

public void setMessagesPackage(String messagesPackage)
Parameters:
messagesPackage - The location of the messages file

getRow

public int getRow()
Returns:
The row on which the occurrence takes place

setRow

public void setRow(int row)
Parameters:
row - The row on which the occurrence takes place

getColumn

public int getColumn()
Returns:
The column on which the occurrence takes place

setColumn

public void setColumn(int column)
Parameters:
column - The column on which the occurrence takes place

getKey

public String getKey()
Returns:
The i18n key

setKey

public void setKey(String key)
Parameters:
key - The i18n key

getArguments

public String getArguments()
Returns:
The arguments from the source code

setArguments

public void setArguments(String arguments)
Parameters:
arguments - The arguments from the source code

getOccurrences

public int getOccurrences()
Returns:
The number of occurrences

setOccurrences

public void setOccurrences(int occurrences)
Parameters:
occurrences - The number of occurrences

incrementOccurrences

public void incrementOccurrences()
Increment the number of occurrences with one.


getSourceLine

public String getSourceLine()
Returns:
the line of source code on which the key occurs.

setSourceLine

public void setSourceLine(String sourceLine)
Parameters:
sourceLine - the line of source code on which the key occurs.