public class PropertyStateValue extends java.lang.Object implements PropertyValue
PropertyValue
implementation that wraps a PropertyState
Modifier and Type | Method and Description |
---|---|
int |
compareTo(@NotNull PropertyValue p2) |
int |
count()
The number of values of this object.
|
boolean |
equals(java.lang.Object o) |
@NotNull Type<?> |
getType()
Determine the type of this value
|
<T> T |
getValue(Type<T> type)
Value of this object.
|
<T> T |
getValue(Type<T> type,
int index)
Value at the given
index . |
int |
hashCode() |
boolean |
isArray()
Determine whether the value is an array of atoms
|
long |
size()
The size of the value of this object.
|
long |
size(int index)
The size of the value at the given
index . |
java.lang.String |
toString() |
@Nullable PropertyState |
unwrap() |
public boolean isArray()
PropertyValue
isArray
in interface PropertyValue
true
if and only if the value is an array of atoms.@NotNull public @NotNull Type<?> getType()
PropertyValue
getType
in interface PropertyValue
@NotNull public <T> T getValue(Type<T> type)
PropertyValue
type
argument. If type.isArray()
is true, this method returns an
Iterable
of the base type
of
type
containing all values of this property.
If the target type is not the same as the type of this property an attempt
is made to convert the value to the target type. If the conversion fails an
exception is thrown.getValue
in interface PropertyValue
type
- target type@NotNull public <T> T getValue(Type<T> type, int index)
PropertyValue
index
.
The type of the return value is determined by the target type
argument.
If the target type is not the same as the type of this property an attempt
is made to convert the value to the target type. If the conversion fails an
exception is thrown.getValue
in interface PropertyValue
type
- target typeindex
public long size()
PropertyValue
size
in interface PropertyValue
public long size(int index)
PropertyValue
index
.size
in interface PropertyValue
index
.public int count()
PropertyValue
1
for atoms.count
in interface PropertyValue
@Nullable public @Nullable PropertyState unwrap()
public int compareTo(@NotNull @NotNull PropertyValue p2)
compareTo
in interface java.lang.Comparable<PropertyValue>
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2010 - 2020 Adobe. All Rights Reserved