Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/minfo/BedloadDiameterFacet.java @ 3867:d8c99ff18db8
Refactor MINFO bed quality resultsets and facets.
flys-artifacts/trunk@5498 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Mon, 17 Sep 2012 14:38:47 +0000 |
parents | 5a8f8fd5310c |
children |
comparison
equal
deleted
inserted
replaced
3866:2e83ed94c513 | 3867:d8c99ff18db8 |
---|---|
37 FLYSArtifact flys = (FLYSArtifact) artifact; | 37 FLYSArtifact flys = (FLYSArtifact) artifact; |
38 | 38 |
39 CalculationResult res = (CalculationResult) flys.compute(context, hash, | 39 CalculationResult res = (CalculationResult) flys.compute(context, hash, |
40 stateId, type, false); | 40 stateId, type, false); |
41 | 41 |
42 Object[] data = (Object[]) res.getData(); // TODO CAST TO SPECIFIC CLASS | 42 int ndx = index >> 8; |
43 Object[] data = | |
44 ((BedQualityResult[]) res.getData())[ndx].getBedloadResults(); // TODO CAST TO SPECIFIC CLASS | |
43 | 45 |
44 return data != null && data.length > index ? data[index] : null; | 46 int ndy = index & 255; |
47 return data != null && data.length > ndy ? data[ndy] : null; | |
45 } | 48 } |
46 | 49 |
47 /** Copy deeply. */ | 50 /** Copy deeply. */ |
48 @Override | 51 @Override |
49 public Facet deepCopy() { | 52 public Facet deepCopy() { |