net.logAnalyzer.analysis
Class SingleValueAnalysis

java.lang.Object
  extended bynet.logAnalyzer.analysis.LAAnalysis
      extended bynet.logAnalyzer.analysis.SingleValueAnalysis

public final class SingleValueAnalysis
extends LAAnalysis

This analysis result class contains an hashtable of values.

Version:
0.1
Author:
Karim REFEYTON

Constructor Summary
SingleValueAnalysis(LAAnalyzer analyzer, java.lang.String name)
          Create a new analysis.
 
Method Summary
 double addToDouble(java.lang.Comparable key, double value)
          Add the specified value to the specified key.
 double addToDouble(java.lang.Comparable key, long value)
          Add the specified value to the specified key.
 long addToLong(java.lang.Comparable key, double value)
          Add the specified value to the specified key.
 long addToLong(java.lang.Comparable key, long value)
          Add the specified value to the specified key.
 void change(java.lang.Comparable oldKey, java.lang.Comparable newKey)
          Change the specified old key to the new key.
 java.util.Date getDate(java.lang.Comparable key)
          Return the resulting value associated to the specified key.
 java.util.Date getDate(int index)
          Return the resulting value associated to the specified key.
 double getDouble(java.lang.Comparable key)
          Return the resulting value associated to the specified key.
 double getDouble(int index)
          Return the resulting value associated to the specified key.
 long getLong(java.lang.Comparable key)
          Return the resulting value associated to the specified key.
 long getLong(int index)
          Return the resulting value associated to the specified key.
 java.lang.String getName()
          Return the value name.
 java.lang.String getString(java.lang.Comparable key)
          Return the resulting value associated to the specified key.
 java.lang.String getString(int index)
          Return the resulting value associated to the specified key.
 java.lang.Object getValue(java.lang.Comparable key)
          Return the resulting value associated to the specified key.
 java.lang.Object getValue(int index)
          Return the resulting value associated to the specified key.
 java.util.Date put(java.lang.Comparable key, java.util.Date value)
          Set the specified value to the current value.
 double put(java.lang.Comparable key, double value)
          Set the specified value to the current value.
 long put(java.lang.Comparable key, long value)
          Set the specified value to the current value.
 java.lang.String put(java.lang.Comparable key, java.lang.String value)
          Set the specified value to the current value.
 void remove(java.lang.Comparable key)
          Remove the specified key of the analysis.
 void remove(int keyIndex)
          Remove the key at the specified index of the analysis.
 void sortDESC()
          Sort results form greatest to lowest.
 
Methods inherited from class net.logAnalyzer.analysis.LAAnalysis
changeKey, containsKey, getAnalyzer, getDateFormat, getDateValue, getDoubleValue, getKey, getKeys, getLongValue, getObjectValue, getStringKey, getStringValue, getValueName, getValueNameIndex, getValuesNames, moveKeyAt, putDateValue, putDoubleValue, putLongValue, putStringValue, removeKey, removeKey, size, sortByValueASC, sortByValueDESC
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SingleValueAnalysis

public SingleValueAnalysis(LAAnalyzer analyzer,
                           java.lang.String name)
Create a new analysis. Its initial value is 0.

Parameters:
analyzer - Analyzer.
name - Name of the value.
Method Detail

addToDouble

public double addToDouble(java.lang.Comparable key,
                          double value)
Add the specified value to the specified key.

Parameters:
key - Key of the value to change.
value - Value to add.
Returns:
Old value if exists; 0 otherwiser.
See Also:
LAAnalysis.putDoubleValue(Comparable, int, double), LAAnalysis.getDoubleValue(Comparable, int)

addToDouble

public double addToDouble(java.lang.Comparable key,
                          long value)
Add the specified value to the specified key.

Parameters:
key - Key of the value to change.
value - Value to add.
Returns:
Old value if exists; 0 otherwiser.
See Also:
LAAnalysis.putDoubleValue(Comparable, int, double), LAAnalysis.getDoubleValue(Comparable, int)

addToLong

public long addToLong(java.lang.Comparable key,
                      double value)
Add the specified value to the specified key.

Parameters:
key - Key of the value to change.
value - Value to add.
Returns:
Old value if exists; 0 otherwiser.
See Also:
LAAnalysis.putLongValue(Comparable, int, long), LAAnalysis.getLongValue(Comparable, int)

addToLong

public long addToLong(java.lang.Comparable key,
                      long value)
Add the specified value to the specified key.

Parameters:
key - Key of the value to change.
value - Value to add.
Returns:
Old value if exists; 0 otherwiser.
See Also:
LAAnalysis.putLongValue(Comparable, int, long), LAAnalysis.getLongValue(Comparable, int)

put

public java.util.Date put(java.lang.Comparable key,
                          java.util.Date value)
Set the specified value to the current value.

Parameters:
key - Key of the value to change.
value - Value to add.
Returns:
Old value if exists; null otherwise.
See Also:
LAAnalysis.putDateValue(Comparable, int, Date)

put

public double put(java.lang.Comparable key,
                  double value)
Set the specified value to the current value.

Parameters:
key - Key of the value to change.
value - Value to add.
Returns:
Old value if exists; 0 otherwise.
See Also:
LAAnalysis.putDoubleValue(Comparable, int, double)

put

public long put(java.lang.Comparable key,
                long value)
Set the specified value to the current value.

Parameters:
key - Key of the value to change.
value - Value to add.
Returns:
Old value if exists; 0 otherwise.
See Also:
LAAnalysis.putLongValue(Comparable, int, long)

put

public java.lang.String put(java.lang.Comparable key,
                            java.lang.String value)
Set the specified value to the current value.

Parameters:
key - Key of the value to change.
value - Value to add.
Returns:
Old value if exists; 0 otherwise.
See Also:
LAAnalysis.putStringValue(Comparable, int, String)

getDate

public java.util.Date getDate(int index)
Return the resulting value associated to the specified key.

Parameters:
index - Index of the value.
Returns:
Value; null if unknown.
See Also:
LAAnalysis.getDateValue(Comparable, int)

getDate

public java.util.Date getDate(java.lang.Comparable key)
Return the resulting value associated to the specified key.

Parameters:
key - Key of the value.
Returns:
Value; null if unknown.
See Also:
LAAnalysis.getDateValue(Comparable, int)

getDouble

public double getDouble(int index)
Return the resulting value associated to the specified key.

Parameters:
index - Index of the value.
Returns:
Value; 0 if unknown.
See Also:
LAAnalysis.getDoubleValue(Comparable, int)

getDouble

public double getDouble(java.lang.Comparable key)
Return the resulting value associated to the specified key.

Parameters:
key - Key of the value.
Returns:
Value; 0 if unknown.
See Also:
LAAnalysis.getDoubleValue(Comparable, int)

getLong

public long getLong(int index)
Return the resulting value associated to the specified key.

Parameters:
index - Index of the value.
Returns:
Value; 0 if unknown.
See Also:
LAAnalysis.getLongValue(Comparable, int)

getLong

public long getLong(java.lang.Comparable key)
Return the resulting value associated to the specified key.

Parameters:
key - Key of the value.
Returns:
Value; 0 if unknown.
See Also:
LAAnalysis.getLongValue(Comparable, int)

getString

public java.lang.String getString(int index)
Return the resulting value associated to the specified key.

Parameters:
index - Index of the value.
Returns:
Value; "" if unknown.
See Also:
LAAnalysis.getStringValue(Comparable, int)

getString

public java.lang.String getString(java.lang.Comparable key)
Return the resulting value associated to the specified key.

Parameters:
key - Key of the value.
Returns:
Value; "" if unknown.
See Also:
LAAnalysis.getStringValue(Comparable, int)

getValue

public java.lang.Object getValue(int index)
Return the resulting value associated to the specified key.

Parameters:
index - Index of the value.
Returns:
Value; null if unknown.
See Also:
LAAnalysis.getObjectValue(Comparable, int)

getValue

public java.lang.Object getValue(java.lang.Comparable key)
Return the resulting value associated to the specified key.

Parameters:
key - Key of the value.
Returns:
Value; null if unknown.
See Also:
LAAnalysis.getObjectValue(Comparable, int)

getName

public java.lang.String getName()
Return the value name.

Returns:
Value name.
See Also:
LAAnalysis.getValueName(int)

change

public void change(java.lang.Comparable oldKey,
                   java.lang.Comparable newKey)
Change the specified old key to the new key.

Parameters:
oldKey - Key to change.
newKey - New key.

remove

public void remove(java.lang.Comparable key)
Remove the specified key of the analysis.

Parameters:
key - Key to remove.

remove

public void remove(int keyIndex)
Remove the key at the specified index of the analysis.

Parameters:
keyIndex - Key index to remove.

sortDESC

public void sortDESC()
Sort results form greatest to lowest.



Copyright © 2006 null. All Rights Reserved.