net.logAnalyzer.analysis
Class MultiValuesAnalysis

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

public final class MultiValuesAnalysis
extends LAAnalysis

This analysis result class contains an hashtable of long values arrays.

Version:
0.1
Author:
Karim REFEYTON

Constructor Summary
MultiValuesAnalysis(LAAnalyzer analyzer, java.lang.String[] names)
          Create a new analysis.
 
Method Summary
 double addToDouble(java.lang.Comparable key, int index, double value)
          Add the specified value to the specified key and index.
 double addToDouble(java.lang.Comparable key, int index, long value)
          Add the specified value to the specified key and index.
 double addToDouble(java.lang.Comparable key, java.lang.String name, double value)
          Add the specified value to the specified key and name.
 double addToDouble(java.lang.Comparable key, java.lang.String name, long value)
          Add the specified value to the specified key and name.
 long addToLong(java.lang.Comparable key, int index, double value)
          Add the specified value to the specified key and index.
 long addToLong(java.lang.Comparable key, int index, long value)
          Add the specified value to the specified key and index.
 long addToLong(java.lang.Comparable key, java.lang.String name, double value)
          Add the specified value to the specified key and name.
 long addToLong(java.lang.Comparable key, java.lang.String name, long value)
          Add the specified value to the specified key and name.
 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, int index)
          Return the resulting value associated to the specified key.
 java.util.Date getDate(java.lang.Comparable key, java.lang.String name)
          Return the resulting value associated to the specified key.
 double getDouble(java.lang.Comparable key, int index)
          Return the resulting value associated to the specified key.
 double getDouble(java.lang.Comparable key, java.lang.String name)
          Return the resulting value associated to the specified key.
 long getLong(java.lang.Comparable key, int index)
          Return the resulting value associated to the specified key.
 long getLong(java.lang.Comparable key, java.lang.String name)
          Return the resulting value associated to the specified key.
 java.lang.String getName(int index)
          Return the value name.
 int getNameIndex(java.lang.String name)
          Return the index of the value name.
 java.lang.String[] getNames()
          Return the values names.
 java.lang.String getString(java.lang.Comparable key, int index)
          Return the resulting value associated to the specified key.
 java.lang.String getString(java.lang.Comparable key, java.lang.String name)
          Return the resulting value associated to the specified key.
 java.lang.Object getValue(java.lang.Comparable key, int index)
          Return the resulting value associated to the specified key.
 java.lang.Object getValue(java.lang.Comparable key, java.lang.String name)
          Return the resulting value associated to the specified key.
 java.util.Date put(java.lang.Comparable key, int index, java.util.Date value)
          Set the specified value to the specified key and index.
 double put(java.lang.Comparable key, int index, double value)
          Set the specified value to the specified key and index.
 long put(java.lang.Comparable key, int index, long value)
          Set the specified value to the specified key and index.
 java.lang.String put(java.lang.Comparable key, int index, java.lang.String value)
          Set the specified value to the specified key and index.
 java.util.Date put(java.lang.Comparable key, java.lang.String name, java.util.Date value)
          Set the specified value to the specified key and name.
 double put(java.lang.Comparable key, java.lang.String name, double value)
          Set the specified value to the specified key and name.
 long put(java.lang.Comparable key, java.lang.String name, long value)
          Set the specified value to the specified key and name.
 java.lang.String put(java.lang.Comparable key, java.lang.String name, java.lang.String value)
          Set the specified value to the specified key and name.
 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 sortASC(int index)
          Sort results by the specified value form lowest to greatest.
 void sortASC(java.lang.String name)
          Sort results by the specified value form lowest to greatest.
 void sortDESC(int index)
          Sort results by the specified value form greatest to lowest.
 void sortDESC(java.lang.String name)
          Sort results by the specified value 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

MultiValuesAnalysis

public MultiValuesAnalysis(LAAnalyzer analyzer,
                           java.lang.String[] names)
Create a new analysis. Its initial value is 0.

Parameters:
analyzer - Analyzer.
names - Names of values.
Method Detail

addToDouble

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

Parameters:
key - Key of the group of values to change.
index - Index of the value in the group 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,
                          int index,
                          long value)
Add the specified value to the specified key and index.

Parameters:
key - Key of the group of values to change.
index - Index of the value in the group 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,
                          java.lang.String name,
                          double value)
Add the specified value to the specified key and name.

Parameters:
key - Key of the group of values to change.
name - Name of the value in the group to change.
value - Value to add.
Returns:
Old value if exists; 0 otherwiser.
See Also:
getNameIndex(String), addToDouble(Comparable, int, double)

addToDouble

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

Parameters:
key - Key of the group of values to change.
name - Name of the value in the group to change.
value - Value to add.
Returns:
Old value if exists; 0 otherwiser.
See Also:
getNameIndex(String), addToDouble(Comparable, int, long)

addToLong

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

Parameters:
key - Key of the group of values to change.
index - Index of the value in the group 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,
                      int index,
                      long value)
Add the specified value to the specified key and index.

Parameters:
key - Key of the group of values to change.
index - Index of the value in the group 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,
                      java.lang.String name,
                      double value)
Add the specified value to the specified key and name.

Parameters:
key - Key of the group of values to change.
name - Name of the value in the group to change.
value - Value to add.
Returns:
Old value if exists; 0 otherwiser.
See Also:
getNameIndex(String), addToLong(Comparable, int, double)

addToLong

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

Parameters:
key - Key of the group of values to change.
name - Name of the value in the group to change.
value - Value to add.
Returns:
Old value if exists; 0 otherwiser.
See Also:
getNameIndex(String), addToLong(Comparable, int, long)

put

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

Parameters:
key - Key of the group of values to change.
index - Index of the value in the group to change.
value - New value.
Returns:
Old value if exists; null otherwise.
See Also:
LAAnalysis.putDateValue(Comparable, int, Date)

put

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

Parameters:
key - Key of the group of values to change.
index - Index of the value in the group to change.
value - New value.
Returns:
Old value if exists; 0 otherwise.
See Also:
LAAnalysis.putDoubleValue(Comparable, int, double)

put

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

Parameters:
key - Key of the group of values to change.
index - Index of the value in the group to change.
value - New value.
Returns:
Old value if exists; 0 otherwise.
See Also:
LAAnalysis.putLongValue(Comparable, int, long)

put

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

Parameters:
key - Key of the group of values to change.
index - Index of the value in the group to change.
value - New value.
Returns:
Old value if exists; 0 otherwise.
See Also:
LAAnalysis.putStringValue(Comparable, int, String)

put

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

Parameters:
key - Key of the group of values to change.
name - Name of the value in the group to change.
value - New value.
Returns:
Old value if exists; null otherwise.
See Also:
getNameIndex(String), put(Comparable, int, Date)

put

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

Parameters:
key - Key of the group of values to change.
name - Name of the value in the group to change.
value - New value.
Returns:
Old value if exists; 0 otherwise.
See Also:
getNameIndex(String), put(Comparable, int, double)

put

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

Parameters:
key - Key of the group of values to change.
name - Name of the value in the group to change.
value - New value.
Returns:
Old value if exists; 0 otherwise.
See Also:
getNameIndex(String), put(Comparable, int, long)

put

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

Parameters:
key - Key of the group of values to change.
name - Name of the value in the group to change.
value - New value.
Returns:
Old value if exists; 0 otherwise.
See Also:
getNameIndex(String), put(Comparable, int, String)

getDate

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

Parameters:
key - Key of the group of values.
index - Index of the value in the group to read.
Returns:
Value; 0 if unknown.
See Also:
LAAnalysis.getDateValue(Comparable, int)

getDate

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

Parameters:
key - Key of the group of values.
name - Name of the value in the group to read.
Returns:
Value; 0 if unknown.
See Also:
LAAnalysis.getDateValue(Comparable, int), LAAnalysis.getValueNameIndex(String)

getDouble

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

Parameters:
key - Key of the group of values.
index - Index of the value in the group to read.
Returns:
Value; 0 if unknown.
See Also:
LAAnalysis.getDoubleValue(Comparable, int)

getDouble

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

Parameters:
key - Key of the group of values.
name - Name of the value in the group to read.
Returns:
Value; 0 if unknown.
See Also:
LAAnalysis.getDoubleValue(Comparable, int), LAAnalysis.getValueNameIndex(String)

getLong

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

Parameters:
key - Key of the group of values.
index - Index of the value in the group to read.
Returns:
Value; 0 if unknown.
See Also:
LAAnalysis.getLongValue(Comparable, int)

getLong

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

Parameters:
key - Key of the group of values.
name - Name of the value in the group to read.
Returns:
Value; 0 if unknown.
See Also:
LAAnalysis.getLongValue(Comparable, int), LAAnalysis.getValueNameIndex(String)

getString

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

Parameters:
key - Key of the group of values.
index - Index of the value in the group to read.
Returns:
Value; "" if unknown.
See Also:
LAAnalysis.getStringValue(Comparable, int)

getString

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

Parameters:
key - Key of the group of values.
name - Name of the value in the group to read.
Returns:
Value; 0 if unknown.
See Also:
LAAnalysis.getStringValue(Comparable, int), LAAnalysis.getValueNameIndex(String)

getValue

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

Parameters:
key - Key of the group of values.
index - Index of the value in the group to read.
Returns:
Value; null if unknown.
See Also:
LAAnalysis.getObjectValue(Comparable, int)

getValue

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

Parameters:
key - Key of the group of values.
name - Name of the value in the group to read.
Returns:
Value; null if unknown.
See Also:
LAAnalysis.getObjectValue(Comparable, int), LAAnalysis.getValueNameIndex(String)

getName

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

Parameters:
index - Index of the value.
Returns:
Value name.
See Also:
LAAnalysis.getValueName(int)

getNameIndex

public int getNameIndex(java.lang.String name)
Return the index of the value name.

Parameters:
name - Name of value.
Returns:
Index of the value name.
See Also:
LAAnalysis.getValueNameIndex(String)

getNames

public java.lang.String[] getNames()
Return the values names.

Returns:
Values names.
See Also:
LAAnalysis.getValuesNames()

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.

sortASC

public void sortASC(int index)
Sort results by the specified value form lowest to greatest.

Parameters:
index - Index of the value used to sort results.

sortASC

public void sortASC(java.lang.String name)
Sort results by the specified value form lowest to greatest.

Parameters:
name - Value name used to sort results.

sortDESC

public void sortDESC(int index)
Sort results by the specified value form greatest to lowest.

Parameters:
index - Index of the value used to sort results.

sortDESC

public void sortDESC(java.lang.String name)
Sort results by the specified value form greatest to lowest.

Parameters:
name - Value name used to sort results.


Copyright © 2006 null. All Rights Reserved.