@CheckForNull public String resolveUUID(String uuid) { return resolveUUID(StringPropertyState.stringProperty("", uuid)); }
/** * Create a {@code PropertyState} from a string. * @param name The name of the property state * @param value The value of the property state * @return The new property state of type {@link Type#STRING} */ public static PropertyState stringProperty( @NotNull String name, @NotNull String value) { return new StringPropertyState(name, value); }
@Nullable public String resolveUUID(String uuid) { return resolveUUID(StringPropertyState.stringProperty("", uuid)); }
@NotNull @Override public Iterable<? extends PropertyState> getProperties() { return Collections.singleton(new StringPropertyState(ERROR_JSON_KEY, ERROR_JSON_VALUE_PREFIX + message)); }
@NotNull public static PropertyValue newString(@NotNull String value) { return new PropertyStateValue(StringPropertyState.stringProperty("", value)); }
/** * Create a {@code PropertyState} from a string. * @param name The name of the property state * @param value The value of the property state * @return The new property state of type {@link Type#STRING} */ public static PropertyState stringProperty( @Nonnull String name, @Nonnull String value) { return new StringPropertyState(name, value); }
@Nullable public String resolveUUID(String uuid) { return resolveUUID(StringPropertyState.stringProperty("", uuid)); }
@NotNull @Override public Iterable<? extends PropertyState> getProperties() { return Collections.singleton(new StringPropertyState(ERROR_JSON_KEY, ERROR_JSON_VALUE_PREFIX + message)); }
@Nonnull public static PropertyValue newString(@Nonnull String value) { return new PropertyStateValue(StringPropertyState.stringProperty("", value)); }
new StringPropertyState(FieldNames.NODE_NAME, getName(path)); for (PropertyState property : Iterables.concat(state.getProperties(), Collections.singleton(nodenamePS))) { String pname = property.getName();
@Override public Value createValue(String value) { return newValue(StringPropertyState.stringProperty("", value), namePathMapper); }
@NotNull public Value createValue(@NotNull String value) { return newValue(StringPropertyState.stringProperty("", value), namePathMapper, getBlobAccessProvider()); }
public static <T> PropertyState createProperty(String name, T value) { if (value instanceof String) { return StringPropertyState.stringProperty(name, (String) value); } else if (value instanceof Blob) { return BinaryPropertyState.binaryProperty(name, (Blob) value);
public static <T> PropertyState createProperty(String name, T value) { if (value instanceof String) { return StringPropertyState.stringProperty(name, (String) value); } else if (value instanceof Blob) { return BinaryPropertyState.binaryProperty(name, (Blob) value);
@Test(expected = NumberFormatException.class) public void testAssignFromStringNumberFormatException() { PropertyState source = StringPropertyState.stringProperty("foo", "bar"); PropertyBuilder builder = PropertyBuilder.scalar(Type.LONG); builder.assignFrom(source); }
return StringPropertyState.stringProperty(name, StringCache.get(jsonString));
return StringPropertyState.stringProperty(name, StringCache.get(jsonString));
switch (type.tag()) { case PropertyType.STRING: return StringPropertyState.stringProperty(name, (String) value); case PropertyType.BINARY: return BinaryPropertyState.binaryProperty(name, (Blob) value);
switch (type.tag()) { case PropertyType.STRING: return StringPropertyState.stringProperty(name, (String) value); case PropertyType.BINARY: return BinaryPropertyState.binaryProperty(name, (Blob) value);
@Test public void testAssignFromString() { PropertyState source = StringPropertyState.stringProperty("foo", "42"); PropertyBuilder builder = PropertyBuilder.scalar(Type.LONG); builder.assignFrom(source); assertEquals(LongPropertyState.createLongProperty("foo", 42L), builder.getPropertyState()); }