BrightSide Workbench Full Report + Source Code
org.turro.usual.UsualUsageComparator< V > Class Template Referenceabstract
Inheritance diagram for org.turro.usual.UsualUsageComparator< V >:
Collaboration diagram for org.turro.usual.UsualUsageComparator< V >:

Public Member Functions

 UsualUsageComparator (String path)
 
int compare (V o1, V o2)
 
abstract String getIdentifier (V v)
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 29 of file UsualUsageComparator.java.

Constructor & Destructor Documentation

◆ UsualUsageComparator()

Definition at line 34 of file UsualUsageComparator.java.

34  {
35  this.path = path;
36  }

Member Function Documentation

◆ compare()

int org.turro.usual.UsualUsageComparator< V >.compare ( o1,
o2 
)

Definition at line 39 of file UsualUsageComparator.java.

39  {
40  Long i1 = cache.get(path + getIdentifier(o1)),
41  i2 = cache.get(path + getIdentifier(o2));
42  if(i1 == null) {
43  i1 = UsualUsages.getUsageCount(path + getIdentifier(o1));
44  cache.put(path + getIdentifier(o1), i1);
45  }
46  if(i2 == null) {
47  i2 = UsualUsages.getUsageCount(path + getIdentifier(o2));
48  cache.put(path + getIdentifier(o2), i2);
49  }
50  return CompareUtil.compare(i2, i1);
51  }
abstract String getIdentifier(V v)
Here is the call graph for this function:

◆ getIdentifier()

abstract String org.turro.usual.UsualUsageComparator< V >.getIdentifier ( v)
abstract
Here is the caller graph for this function:

The documentation for this class was generated from the following file: