mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-19 19:14:55 +00:00
Added comments to the PageViews class
This commit is contained in:
parent
477d8c6d72
commit
2d215536bb
@ -74,6 +74,10 @@ public final class SearchData {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Enum representing the number of page views a domain has received. Page
|
||||||
|
* views a grouped into ranges for cleaner display and management.
|
||||||
|
*/
|
||||||
@NbBundle.Messages({
|
@NbBundle.Messages({
|
||||||
"# {0} - minValue",
|
"# {0} - minValue",
|
||||||
"# {1} - maxValue",
|
"# {1} - maxValue",
|
||||||
@ -105,10 +109,16 @@ public final class SearchData {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determines if the given count is covered by this PageView interval.
|
||||||
|
*/
|
||||||
boolean covers(long count) {
|
boolean covers(long count) {
|
||||||
return count >= minValue && count <= maxValue;
|
return count >= minValue && count <= maxValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Utility to fetch the appropriate PageView interval for the given count.
|
||||||
|
*/
|
||||||
public static PageViews fromPageViewCount(long count) {
|
public static PageViews fromPageViewCount(long count) {
|
||||||
for (PageViews view : PageViews.values()) {
|
for (PageViews view : PageViews.values()) {
|
||||||
if (view.covers(count)) {
|
if (view.covers(count)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user