public class StringPropertyState extends EmptyPropertyState
| Constructor and Description |
|---|
StringPropertyState(@NotNull String name,
@NotNull String value) |
| Modifier and Type | Method and Description |
|---|---|
int |
count() |
Conversions.Converter |
getConverter()
Create a converter for converting the value of this property to other types.
|
org.apache.jackrabbit.oak.api.Type<?> |
getType() |
String |
getValue()
The value of this property
|
<S> S |
getValue(org.apache.jackrabbit.oak.api.Type<S> type) |
<S> S |
getValue(org.apache.jackrabbit.oak.api.Type<S> type,
int index) |
boolean |
isArray() |
long |
size() |
long |
size(int index) |
static org.apache.jackrabbit.oak.api.PropertyState |
stringProperty(@NotNull String name,
@NotNull String value)
Create a
PropertyState from a string. |
emptyProperty, getNamepublic static org.apache.jackrabbit.oak.api.PropertyState stringProperty(@NotNull @NotNull String name, @NotNull @NotNull String value)
PropertyState from a string.name - The name of the property statevalue - The value of the property stateType.STRINGpublic 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–2019 The Apache Software Foundation. All rights reserved.