Class JSListImpl<T>
- java.lang.Object
-
- org.bedework.jsforj.impl.values.JSValueImpl
-
- org.bedework.jsforj.impl.values.collections.JSListImpl<T>
-
- Direct Known Subclasses:
JSStringListImpl
public abstract class JSListImpl<T> extends JSValueImpl implements JSList<T>
User: mike Date: 10/25/19 Time: 12:45
-
-
Field Summary
-
Fields inherited from class org.bedework.jsforj.impl.values.JSValueImpl
factory, type
-
-
Constructor Summary
Constructors Constructor Description JSListImpl(String type, com.fasterxml.jackson.databind.JsonNode node)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidadd(T val)booleancontains(T val)protected abstract TconvertToT(String val)protected abstract StringfieldName(T val)List<T>get()Tget(int index)protected JSProperty<?>makeProperty(String name, com.fasterxml.jackson.databind.JsonNode node)voidremove(T val)intsize()Returns the number of elements in this list.protected abstract voidstore(T val)-
Methods inherited from class org.bedework.jsforj.impl.values.JSValueImpl
assertArray, assertBooleanNode, assertIntNode, assertObject, assertStringNode, clear, equals, getBooleanProperty, getBooleanValue, getChanged, getFactory, getNode, getObjectType, getOverrideGenerated, getOwner, getParentProperty, getProperties, getProperty, getProperty, getPropertyValue, getStringProperty, getStringValue, getType, getUnsignedIntegerProperty, getValue, hasChanges, hasProperty, isString, makeProperty, markOverrideGenerated, newProperty, preWrite, removeProperty, setMasterCopy, setOwner, setParentProperty, setProperty, setProperty, setProperty, setProperty, setProperty, writeValue, writeValueAsString, writeValueAsStringFormatted
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.bedework.jsforj.model.values.JSValue
clear, copy, getBooleanProperty, getBooleanValue, getChanged, getNode, getObjectType, getOverrideGenerated, getOwner, getParentProperty, getProperties, getProperty, getProperty, getPropertyValue, getStringProperty, getStringValue, getType, getUnsignedIntegerProperty, getValue, hasChanges, hasProperty, isString, makeProperty, markOverrideGenerated, newProperty, preWrite, removeProperty, setProperty, setProperty, setProperty, setProperty, setProperty, writeValue, writeValueAsString, writeValueAsStringFormatted
-
-
-
-
Constructor Detail
-
JSListImpl
public JSListImpl(String type, com.fasterxml.jackson.databind.JsonNode node)
-
-
Method Detail
-
store
protected abstract void store(T val)
- Parameters:
val- external representation
-
fieldName
protected abstract String fieldName(T val)
- Parameters:
val- external representation- Returns:
- field name
-
convertToT
protected abstract T convertToT(String val)
- Parameters:
val- json field name- Returns:
- external representation
-
makeProperty
protected JSProperty<?> makeProperty(String name, com.fasterxml.jackson.databind.JsonNode node)
- Overrides:
makePropertyin classJSValueImpl
-
size
public int size()
Description copied from interface:JSListReturns the number of elements in this list. If this list contains more thanInteger.MAX_VALUEelements, returnsInteger.MAX_VALUE.
-
get
public T get(int index)
-
add
public void add(T val)
-
contains
public boolean contains(T val)
-
-