Package hec.gfx2d.swing.charts.bar
Class BarData
java.lang.Object
hec.gfx2d.swing.charts.bar.BarData
Copyright (C) 2017 Hydrologic Engineering Center,
United States Army Corps of Engineers, All Rights Reserved
HEC-Java NEXGEN
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
overwrites the data at the current location with the data from anotherboolean
fetch this data's locationfetch data qualityint
fetch this data's order in the relevant stream lower values are higher upstreamgetValue()
fetch data valueint
hashCode()
void
establishes this bar's value, with no quality informationvoid
establishes the bar's value, with quality informationstatic Comparator<BarData>
streamComparator
(boolean upstream) constructs a comparator for sorting location data by stream ordervoid
updateQuality
(Integer quality) provide a new quality rating for a known valuestatic Comparator<BarData>
valueComparator
(boolean reverse) constructs a comparator for sorting location data by value
-
Constructor Details
-
BarData
builds a location data default with a location- Parameters:
location
- the location for this data
-
-
Method Details
-
getLocation
fetch this data's location- Returns:
- this data's location
-
getStreamOrder
public int getStreamOrder()fetch this data's order in the relevant stream lower values are higher upstream- Returns:
- the stream order priority value (lower value = upstream)
-
setValue
establishes this bar's value, with no quality information- Parameters:
value
- the value to insert
-
setValue
establishes the bar's value, with quality information- Parameters:
value
- the value to insertquality
- the quality rating of that value
-
updateQuality
provide a new quality rating for a known value- Parameters:
quality
- the new data quality
-
getValue
fetch data value- Returns:
- the value stored at this bar
-
getQuality
fetch data quality- Returns:
- the quality stored at this bar
-
copy
overwrites the data at the current location with the data from another- Parameters:
data
- the location data to write into this location
-
streamComparator
constructs a comparator for sorting location data by stream order- Parameters:
upstream
- whether upstream data should come sooner in the list than downstream data(true) or not (false)- Returns:
- the comparator
-
valueComparator
constructs a comparator for sorting location data by value- Parameters:
reverse
- sorting direction (low to high or high to low)- Returns:
- the comparator
-
equals
-
hashCode
public int hashCode()
-