Package net.sf.tweety.preferences.update
Class Update<T>
- java.lang.Object
-
- net.sf.tweety.preferences.update.Update<T>
-
- Type Parameters:
T
- the generic element type
public class Update<T> extends java.lang.Object
This Update-class provides update-elements used within dynamic preference aggregations- Author:
- Bastian Wolf
-
-
Method Summary
Modifier and Type Method Description java.lang.Integer
getAmount()
returns the third element of this quadrupleT
getElement()
returns the fourth element of this quadrupleOperation
getOperation()
returns the second element of this quadrupleint
getPreferenceOrderIndex()
returns the first element of this quadrupleint
hashCode()
void
setAmount(java.lang.Integer amount)
sets the third element of this triplevoid
setElement(T element)
sets the fourth element of this triplevoid
setOperation(Operation op)
sets the second element of this triplevoid
setPreferenceOrderIndex(int index)
sets the first element of this triple
-
-
-
Constructor Detail
-
Update
public Update(int index, Operation op, java.lang.Integer amount, T element)
The constructor for update-elements- Parameters:
index
- the preference operation index in the input setop
- the operation that is going to be used (WEAKEN or STRENGTHEN)amount
- the amount of operations to be usedelement
- the element within the preference order to be affected
-
-
Method Detail
-
getPreferenceOrderIndex
public int getPreferenceOrderIndex()
returns the first element of this quadruple- Returns:
- the first element of this quadruple
-
setPreferenceOrderIndex
public void setPreferenceOrderIndex(int index)
sets the first element of this triple- Parameters:
index
- the index of the preference order in the input set
-
getOperation
public Operation getOperation()
returns the second element of this quadruple- Returns:
- the second element of this quadruple
-
setOperation
public void setOperation(Operation op)
sets the second element of this triple- Parameters:
op
- an object of type E
-
getAmount
public java.lang.Integer getAmount()
returns the third element of this quadruple- Returns:
- the third element of this quadruple
-
setAmount
public void setAmount(java.lang.Integer amount)
sets the third element of this triple- Parameters:
amount
- an object of type F
-
getElement
public T getElement()
returns the fourth element of this quadruple- Returns:
- the fourth element of this quadruple
-
setElement
public void setElement(T element)
sets the fourth element of this triple- Parameters:
element
- an object of type H
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-