All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.sphere.sdk.search.SearchModelImpl Maven / Gradle / Ivy

There is a newer version: 1.0.0-M26
Show newest version
package io.sphere.sdk.search;

import io.sphere.sdk.models.Base;

import javax.annotation.Nullable;

public class SearchModelImpl extends Base implements SearchModel {
    @Nullable
    private final SearchModel parent;
    @Nullable
    private final String pathSegment;

    protected SearchModelImpl(@Nullable final SearchModel parent, @Nullable final String pathSegment) {
        this.parent = parent;
        this.pathSegment = pathSegment;
    }

    //for testing
    SearchModelImpl appended(final String pathSegment) {
        return new SearchModelImpl<>(this, pathSegment) ;
    }

    @Override
    public String getPathSegment() {
        return pathSegment;
    }

    @Nullable
    @Override
    public SearchModel getParent() {
        return parent;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy