Package sk.ipesoft.d2000.base
Class D2SD<T extends sk.ipesoft.d2000.datatable.Table<T,R,sk.ipesoft.d2000.datatable.TableRowBean>,R extends sk.ipesoft.d2000.datatable.TableRow<T,R,sk.ipesoft.d2000.datatable.TableRowBean>>
- java.lang.Object
-
- sk.ipesoft.d2000.base.D2Base<sk.ipesoft.d2000.base.UnivalRecord<T,R,sk.ipesoft.d2000.datatable.TableRowBean>>
-
- sk.ipesoft.d2000.base.D2SD<T,R>
-
- All Implemented Interfaces:
java.lang.Comparable<D2Base<?>>
public abstract class D2SD<T extends sk.ipesoft.d2000.datatable.Table<T,R,sk.ipesoft.d2000.datatable.TableRowBean>,R extends sk.ipesoft.d2000.datatable.TableRow<T,R,sk.ipesoft.d2000.datatable.TableRowBean>> extends D2Base<sk.ipesoft.d2000.base.UnivalRecord<T,R,sk.ipesoft.d2000.datatable.TableRowBean>>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
D2SD.IComparer
-
Field Summary
-
Fields inherited from class sk.ipesoft.d2000.base.D2Base
__col, __hobj, __indirectCol, __indirectHOBJ, __indirectRow, __internalId, __locVarId, __row
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description abstract int
ada_get_structTypeId()
sk.ipesoft.d2000.base.UnivalRecord<T,R,sk.ipesoft.d2000.datatable.TableRowBean>
asUnivalValue()
static void
calcStruct(D2SD<?,?> structA, D2SD<?,?> structB, D2SD<?,?> structC, Operation operation, boolean invalidIsZero)
Calculates structC = structA (operation) structBstatic void
calcStruct(D2SD<?,?> structA, D2SD<?,?> structB, D2SD<?,?> structC, Operation operation, int fromRowA, int fromColA, int fromRowB, int fromColB, int fromRowC, int fromColC, int numRows, int numCols, boolean invalidIsZero)
Calculates structC = structA (operation) structB on given rectanglevoid
deleteRow(int row)
Deletes given row from structure.void
deleteRows(int fromRow, int toRow)
Deletes rows fromRow ..boolean
equals(D2SD<?,?> struct, java.util.EnumSet<sk.ipesoft.d2000.base.Compare> compare)
Compares this structure with another local structure.boolean
equals(D2SD<?,?> struct, java.util.EnumSet<sk.ipesoft.d2000.base.Compare> compare, int fromRowA, int fromColA, int fromRowB, int fromColB, int numRows, int numCols)
Compares given part of this structure with part of another local structure.D2Base<?>
getCell(int row, int col)
ColumnBase
getCol(int col)
int
getColCount()
java.lang.String
getColName(int col)
D2SRow
getRowAsD2SRow(int rowNr)
int
getRowCount()
T
getTable()
sk.ipesoft.d2000.base.UnivalObjectReference
getUnivalObjectReference(int row, int col)
sk.ipesoft.d2000.base.UnivalType
getValueType()
void
redim(int rowCount)
Deprecated.double
rowAvg(int row)
double
rowAvg(int row, int fromCol, int toCol)
double
rowMax(int row)
double
rowMax(int row, int fromCol, int toCol)
double
rowMin(int row)
double
rowMin(int row, int fromCol, int toCol)
double
rowSum(int row)
double
rowSum(int row, int fromCol, int toCol)
void
setCellObject(int row, int col, D2Base<?> base)
void
setRowCount(int rowCount)
void
sortStruct(D2SD.IComparer c)
Sorts rows of local structure using defined comparer-
Methods inherited from class sk.ipesoft.d2000.base.D2Base
add, addChangeListener, addFlags, compareTo, divide, equals, equals, getCol, getFlag, getFlagMask, getFlags, getHOBJ, getLimitStatus, getLimitStatusOrdinal, getLocVarId, getObjectInfo, getProcessAlarmStatus, getProcessAlarmStatusOrdinal, getProcessAlarmTime, getProcessAlarmTimeMiliseconds, getReferencedCol, getReferencedHOBJ, getReferencedRow, getRow, getStatusMask, getTime, getTimeMiliseconds, getTimeMilliseconds, getUnivalObjectReference, getValid, getWeak, is, isBackedExternally, isFromAda, isStatusSet, isValid, multiply, removeChangeListener, removeFlags, setAs, setData, setFlag, setFlag, setFlags, setFlags, setIndirect, setInvalid, setLocVarId, setTime, setTimeMiliseconds, setTimeMilliseconds, setVal, setVal, setWeak, setWeak, substract, toString
-
-
-
-
Method Detail
-
calcStruct
public static void calcStruct(D2SD<?,?> structA, D2SD<?,?> structB, D2SD<?,?> structC, Operation operation, int fromRowA, int fromColA, int fromRowB, int fromColB, int fromRowC, int fromColC, int numRows, int numCols, boolean invalidIsZero)
Calculates structC = structA (operation) structB on given rectangle- Parameters:
structA
- first operand.structB
- second operandstructC
- resultoperation
- arithmetic operation to performfromRowA
- One-based index of the first row in first operandfromColA
- One-based index of the first column in first operandfromRowB
- One-based index of the first row in second operandfromColB
- One-based index of the first column in second operandfromRowC
- One-based index of the first row in resultfromColC
- One-based index of the first column in resultnumRows
- number of rowsnumCols
- number of columnsinvalidIsZero
- interpret invalid value as valid zero value.
-
calcStruct
public static void calcStruct(D2SD<?,?> structA, D2SD<?,?> structB, D2SD<?,?> structC, Operation operation, boolean invalidIsZero)
Calculates structC = structA (operation) structB- Parameters:
structA
-structB
-structC
-operation
-invalidIsZero
-
-
ada_get_structTypeId
public abstract int ada_get_structTypeId()
-
asUnivalValue
public sk.ipesoft.d2000.base.UnivalRecord<T,R,sk.ipesoft.d2000.datatable.TableRowBean> asUnivalValue()
- Overrides:
asUnivalValue
in classD2Base<sk.ipesoft.d2000.base.UnivalRecord<T extends sk.ipesoft.d2000.datatable.Table<T,R,sk.ipesoft.d2000.datatable.TableRowBean>,R extends sk.ipesoft.d2000.datatable.TableRow<T,R,sk.ipesoft.d2000.datatable.TableRowBean>,sk.ipesoft.d2000.datatable.TableRowBean>>
-
deleteRow
public void deleteRow(int row)
Deletes given row from structure.- Parameters:
row
- One-based index of row to delete
-
deleteRows
public void deleteRows(int fromRow, int toRow)
Deletes rows fromRow .. toRow from structure.- Parameters:
fromRow
- One-based index of the first deleted rowtoRow
- One-based index of the last (inclusive) deleted row
-
equals
public boolean equals(D2SD<?,?> struct, java.util.EnumSet<sk.ipesoft.d2000.base.Compare> compare, int fromRowA, int fromColA, int fromRowB, int fromColB, int numRows, int numCols) throws ExceptionParameterError
Compares given part of this structure with part of another local structure. Invalid values are equal.- Parameters:
struct
- structure to compare withcompare
- compare parametersfromRowA
- upper left corner of this structurefromColA
- upper left corner of this structurefromRowB
- upper left corner of structfromColB
- upper left corner of structnumRows
- number of rows to comparenumCols
- number of columns to compare- Returns:
- true if structures are equal according to compare parameter, else false
- Throws:
ExceptionParameterError
-
equals
public boolean equals(D2SD<?,?> struct, java.util.EnumSet<sk.ipesoft.d2000.base.Compare> compare) throws ExceptionParameterError
Compares this structure with another local structure. Invalid values are equal. Structure struct must have at least the same number of row and columns as this structure.- Parameters:
struct
- structure to compare withcompare
- compare parameters- Returns:
- true if structures are equal according to compare parameter, else false
- Throws:
ExceptionParameterError
-
getCell
public final D2Base<?> getCell(int row, int col)
-
getCol
public ColumnBase getCol(int col)
-
getColCount
public int getColCount()
-
getColName
public java.lang.String getColName(int col)
-
getRowAsD2SRow
public final D2SRow getRowAsD2SRow(int rowNr)
-
getRowCount
public final int getRowCount()
-
getTable
public T getTable()
-
getUnivalObjectReference
public sk.ipesoft.d2000.base.UnivalObjectReference getUnivalObjectReference(int row, int col)
-
getValueType
public sk.ipesoft.d2000.base.UnivalType getValueType()
- Overrides:
getValueType
in classD2Base<sk.ipesoft.d2000.base.UnivalRecord<T extends sk.ipesoft.d2000.datatable.Table<T,R,sk.ipesoft.d2000.datatable.TableRowBean>,R extends sk.ipesoft.d2000.datatable.TableRow<T,R,sk.ipesoft.d2000.datatable.TableRowBean>,sk.ipesoft.d2000.datatable.TableRowBean>>
-
redim
@Deprecated public void redim(int rowCount)
Deprecated.
-
rowAvg
public double rowAvg(int row, int fromCol, int toCol)
- Parameters:
row
-fromCol
-toCol
-- Returns:
- average value of given row using columns fromCol .. toCol
-
rowAvg
public double rowAvg(int row)
- Parameters:
row
-- Returns:
- average value of given row
-
rowMax
public double rowMax(int row, int fromCol, int toCol)
- Parameters:
row
-fromCol
-toCol
-- Returns:
- maximal value in given row using columns fromCol .. toCol
-
rowMax
public double rowMax(int row)
- Parameters:
row
-- Returns:
- maximal value in given row
-
rowMin
public double rowMin(int row, int fromCol, int toCol)
- Parameters:
row
-fromCol
-toCol
-- Returns:
- minimal value in given row using columns fromCol .. toCol
-
rowMin
public double rowMin(int row)
- Parameters:
row
-- Returns:
- minimal value in given row
-
rowSum
public double rowSum(int row, int fromCol, int toCol)
- Parameters:
row
-fromCol
-toCol
-- Returns:
- sum of given row using columns fromCol .. toCol
-
rowSum
public double rowSum(int row)
- Parameters:
row
-- Returns:
- sum of given row
-
setCellObject
public final void setCellObject(int row, int col, D2Base<?> base)
-
setRowCount
public void setRowCount(int rowCount)
-
sortStruct
public void sortStruct(D2SD.IComparer c)
Sorts rows of local structure using defined comparer- Parameters:
c
-
-
-