public static LocalEmbeddable valueOfPlaceEntity sourcePlace return new LocalEmbeddablefromsourcePlace; public LocalEmbeddable fromPlaceEntity sourcePlace PlaceEntity currentPlace = sourcePlace;
/**
- Creates a new LocalEmbeddable object based on a PlaceEntity object.
- @param sourcePlace the PlaceEntity object to convert to a LocalEmbeddable object
- @return the LocalEmbeddable object created from the PlaceEntity object */ public static LocalEmbeddable valueOf(PlaceEntity sourcePlace){ return new LocalEmbeddable().from(sourcePlace); }
/**
-
Converts a PlaceEntity object to a LocalEmbeddable object by recursively setting its values based on the parent places.
-
@param sourcePlace the PlaceEntity object to convert
-
@return the LocalEmbeddable object with its values set based on the parent places of the sourcePlace */ public LocalEmbeddable from(PlaceEntity sourcePlace) { PlaceEntity currentPlace = sourcePlace; while(null != currentPlace){ value(currentPlace); currentPlace = currentPlace.getParent(); }
return this;
原文地址: http://www.cveoy.top/t/topic/eYaz 著作权归作者所有。请勿转载和采集!