Class DoubleSlot<T>
- java.lang.Object
-
- org.incenp.obofoundry.sssom.slots.Slot<T>
-
- org.incenp.obofoundry.sssom.slots.DoubleSlot<T>
-
- Type Parameters:
T- The type of SSSOM object the slot is associated with.
public class DoubleSlot<T> extends Slot<T>
Represents a metadata slot that holds a numerical value.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(ISlotVisitor<T> visitor, T target, Object value)Accepts a visitor.voidsetValue(T object, String value)Parses a string value into a numerical value and assigns it to the slot for the given object.-
Methods inherited from class org.incenp.obofoundry.sssom.slots.Slot
accept, getCompliantVersion, getName, getType, getURI, getValue, isEntityReference, isPropagatable, isURI, setValue
-
-
-
-
Method Detail
-
accept
public void accept(ISlotVisitor<T> visitor, T target, Object value)
Description copied from class:SlotAccepts a visitor.
-
setValue
public void setValue(T object, String value)
Parses a string value into a numerical value and assigns it to the slot for the given object.- Overrides:
setValuein classSlot<T>- Parameters:
object- The object (e.g. a mapping or a mapping set) for which the slot should be set.value- The value to assign to the slot on the given object.- Throws:
IllegalArgumentException- If the numerical value is out of the range accepted for the slot.NumberFormatException- If the given string cannot be parsed into a numerical value.
-
-