public class GenericPropertyState extends EmptyPropertyState
| Constructor and Description |
|---|
GenericPropertyState(@NotNull String name,
@NotNull String value,
@NotNull org.apache.jackrabbit.oak.api.Type<?> type) |
emptyProperty, getNamepublic GenericPropertyState(@NotNull
@NotNull String name,
@NotNull
@NotNull String value,
@NotNull
@NotNull org.apache.jackrabbit.oak.api.Type<?> type)
IllegalArgumentException - if type.isArray() is truepublic static org.apache.jackrabbit.oak.api.PropertyState dateProperty(String name, String value)
PropertyState from a date. No validation is performed
on the string passed for value.name - The name of the property statevalue - The value of the property stateType.DATEpublic static org.apache.jackrabbit.oak.api.PropertyState nameProperty(String name, String value)
PropertyState from a name. No validation is performed
on the string passed for value.name - The name of the property statevalue - The value of the property stateType.NAMEpublic static org.apache.jackrabbit.oak.api.PropertyState pathProperty(String name, String value)
PropertyState from a path. No validation is performed
on the string passed for value.name - The name of the property statevalue - The value of the property stateType.PATHpublic static org.apache.jackrabbit.oak.api.PropertyState referenceProperty(String name, String value)
PropertyState from a reference. No validation is performed
on the string passed for value.name - The name of the property statevalue - The value of the property stateType.REFERENCEpublic static org.apache.jackrabbit.oak.api.PropertyState weakreferenceProperty(String name, String value)
PropertyState from a weak reference. No validation is performed
on the string passed for value.name - The name of the property statevalue - The value of the property stateType.WEAKREFERENCEpublic static org.apache.jackrabbit.oak.api.PropertyState uriProperty(String name, String value)
PropertyState from a URI. No validation is performed
on the string passed for value.name - The name of the property statevalue - The value of the property stateType.URIpublic String getValue()
public Conversions.Converter getConverter()
public org.apache.jackrabbit.oak.api.Type<?> getType()
public boolean isArray()
isArray in interface org.apache.jackrabbit.oak.api.PropertyStateisArray in class EmptyPropertyStatefalse@NotNull public <S> S getValue(org.apache.jackrabbit.oak.api.Type<S> type)
getValue in interface org.apache.jackrabbit.oak.api.PropertyStategetValue in class EmptyPropertyStatetype.isArray() is true.IllegalArgumentException - if type is not one of the
values defined in Type.@NotNull public <S> S getValue(org.apache.jackrabbit.oak.api.Type<S> type, int index)
getValue in interface org.apache.jackrabbit.oak.api.PropertyStategetValue in class EmptyPropertyStateIllegalArgumentException - if type.isArray is trueIndexOutOfBoundsException - if index != 0public long size()
size in interface org.apache.jackrabbit.oak.api.PropertyStatesize in class EmptyPropertyStategetString().length()public long size(int index)
size in interface org.apache.jackrabbit.oak.api.PropertyStatesize in class EmptyPropertyStatesizeIndexOutOfBoundsException - if index != 0public int count()
count in interface org.apache.jackrabbit.oak.api.PropertyStatecount in class EmptyPropertyState1Copyright © 2012–2018 The Apache Software Foundation. All rights reserved.