class ImmutableEntityIdWithResourceType implements EntityIdWithResourceType {

    static EntityIdWithResourceType readFrom(final String string) {
        checkNotNull(string, "string");

        final int delimiterIndex = string.indexOf(DELIMITER);
        if (delimiterIndex < 0) {
            final String message = MessageFormat.format("Unexpected EntityId format: <{0}>", string);
            throw new IllegalArgumentException(message);
        } else {
            final EntityId id = DefaultEntityId.of(string.substring(delimiterIndex + 1));
            final String resourceType = string.substring(0, delimiterIndex);
            return new ImmutableEntityIdWithResourceType(resourceType, id, null);
        }
    }

    private  ImmutableEntityIdWithResourceType(
            final String resourceType,
            final EntityId id,
            @Nullable final CacheLookupContext cacheLookupContext);

}