Java Code Examples for org.springframework.util.CollectionUtils#mergeArrayIntoCollection()
The following examples show how to use
org.springframework.util.CollectionUtils#mergeArrayIntoCollection() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ArticleCommentMvcTests.java From jakduk-api with MIT License | 6 votes |
private List<FieldDescriptor> getArticleCommentsDescriptor(FieldDescriptor... descriptors) { List<FieldDescriptor> fieldDescriptors = new ArrayList<>( Arrays.asList( fieldWithPath("comments").type(JsonFieldType.ARRAY).description("댓글 목록"), fieldWithPath("comments.[].id").type(JsonFieldType.STRING).description("댓글 ID"), subsectionWithPath("comments.[].article").type(JsonFieldType.OBJECT).description("연동 글"), subsectionWithPath("comments.[].writer").type(JsonFieldType.OBJECT).description("글쓴이"), fieldWithPath("comments.[].content").type(JsonFieldType.STRING).description("댓글 내용"), fieldWithPath("comments.[].numberOfLike").type(JsonFieldType.NUMBER).description("좋아요 수"), fieldWithPath("comments.[].numberOfDislike").type(JsonFieldType.NUMBER).description("싫어요 수"), fieldWithPath("comments.[].myFeeling").type(JsonFieldType.STRING).description("나의 감정 상태. 인증 쿠키가 있고, 감정 표현을 한 경우 포함 된다."), subsectionWithPath("comments.[].galleries").type(JsonFieldType.ARRAY).description("그림 목록"), subsectionWithPath("comments.[].logs").type(JsonFieldType.ARRAY).description("로그 기록 목록") ) ); CollectionUtils.mergeArrayIntoCollection(descriptors, fieldDescriptors); return fieldDescriptors; }
Example 2
Source File: HandlerExecutionChain.java From spring-analysis-note with MIT License | 5 votes |
private List<HandlerInterceptor> initInterceptorList() { if (this.interceptorList == null) { this.interceptorList = new ArrayList<>(); if (this.interceptors != null) { // An interceptor array specified through the constructor CollectionUtils.mergeArrayIntoCollection(this.interceptors, this.interceptorList); } } this.interceptors = null; return this.interceptorList; }
Example 3
Source File: HandlerExecutionChain.java From java-technology-stack with MIT License | 5 votes |
/** * Create a new HandlerExecutionChain. * @param handler the handler object to execute * @param interceptors the array of interceptors to apply * (in the given order) before the handler itself executes */ public HandlerExecutionChain(Object handler, @Nullable HandlerInterceptor... interceptors) { if (handler instanceof HandlerExecutionChain) { HandlerExecutionChain originalChain = (HandlerExecutionChain) handler; this.handler = originalChain.getHandler(); this.interceptorList = new ArrayList<>(); CollectionUtils.mergeArrayIntoCollection(originalChain.getInterceptors(), this.interceptorList); CollectionUtils.mergeArrayIntoCollection(interceptors, this.interceptorList); } else { this.handler = handler; this.interceptors = interceptors; } }
Example 4
Source File: HandlerExecutionChain.java From java-technology-stack with MIT License | 5 votes |
private List<HandlerInterceptor> initInterceptorList() { if (this.interceptorList == null) { this.interceptorList = new ArrayList<>(); if (this.interceptors != null) { // An interceptor array specified through the constructor CollectionUtils.mergeArrayIntoCollection(this.interceptors, this.interceptorList); } } this.interceptors = null; return this.interceptorList; }
Example 5
Source File: HandlerExecutionChain.java From spring4-understanding with Apache License 2.0 | 5 votes |
/** * Create a new HandlerExecutionChain. * @param handler the handler object to execute * @param interceptors the array of interceptors to apply * (in the given order) before the handler itself executes */ public HandlerExecutionChain(Object handler, HandlerInterceptor... interceptors) { if (handler instanceof HandlerExecutionChain) { HandlerExecutionChain originalChain = (HandlerExecutionChain) handler; this.handler = originalChain.getHandler(); this.interceptorList = new ArrayList<HandlerInterceptor>(); CollectionUtils.mergeArrayIntoCollection(originalChain.getInterceptors(), this.interceptorList); CollectionUtils.mergeArrayIntoCollection(interceptors, this.interceptorList); } else { this.handler = handler; this.interceptors = interceptors; } }
Example 6
Source File: HandlerExecutionChain.java From spring-analysis-note with MIT License | 5 votes |
/** * Create a new HandlerExecutionChain. * @param handler the handler object to execute * @param interceptors the array of interceptors to apply * (in the given order) before the handler itself executes */ public HandlerExecutionChain(Object handler, @Nullable HandlerInterceptor... interceptors) { if (handler instanceof HandlerExecutionChain) { HandlerExecutionChain originalChain = (HandlerExecutionChain) handler; this.handler = originalChain.getHandler(); this.interceptorList = new ArrayList<>(); CollectionUtils.mergeArrayIntoCollection(originalChain.getInterceptors(), this.interceptorList); CollectionUtils.mergeArrayIntoCollection(interceptors, this.interceptorList); } else { this.handler = handler; this.interceptors = interceptors; } }
Example 7
Source File: HandlerExecutionChain.java From lams with GNU General Public License v2.0 | 5 votes |
/** * Create a new HandlerExecutionChain. * @param handler the handler object to execute * @param interceptors the array of interceptors to apply * (in the given order) before the handler itself executes */ public HandlerExecutionChain(Object handler, HandlerInterceptor... interceptors) { if (handler instanceof HandlerExecutionChain) { HandlerExecutionChain originalChain = (HandlerExecutionChain) handler; this.handler = originalChain.getHandler(); this.interceptorList = new ArrayList<HandlerInterceptor>(); CollectionUtils.mergeArrayIntoCollection(originalChain.getInterceptors(), this.interceptorList); CollectionUtils.mergeArrayIntoCollection(interceptors, this.interceptorList); } else { this.handler = handler; this.interceptors = interceptors; } }
Example 8
Source File: HandlerExecutionChain.java From spring4-understanding with Apache License 2.0 | 5 votes |
/** * Create a new HandlerExecutionChain. * @param handler the handler object to execute * @param interceptors the array of interceptors to apply * (in the given order) before the handler itself executes */ public HandlerExecutionChain(Object handler, HandlerInterceptor... interceptors) { if (handler instanceof HandlerExecutionChain) { HandlerExecutionChain originalChain = (HandlerExecutionChain) handler; this.handler = originalChain.getHandler(); this.interceptorList = new ArrayList<HandlerInterceptor>(); CollectionUtils.mergeArrayIntoCollection(originalChain.getInterceptors(), this.interceptorList); CollectionUtils.mergeArrayIntoCollection(interceptors, this.interceptorList); } else { this.handler = handler; this.interceptors = interceptors; } }
Example 9
Source File: HandlerExecutionChain.java From lams with GNU General Public License v2.0 | 5 votes |
private List<HandlerInterceptor> initInterceptorList() { if (this.interceptorList == null) { this.interceptorList = new ArrayList<HandlerInterceptor>(); if (this.interceptors != null) { // An interceptor array specified through the constructor CollectionUtils.mergeArrayIntoCollection(this.interceptors, this.interceptorList); } } this.interceptors = null; return this.interceptorList; }
Example 10
Source File: HeaderValueHolder.java From java-technology-stack with MIT License | 4 votes |
public void addValueArray(Object values) { CollectionUtils.mergeArrayIntoCollection(values, this.values); }
Example 11
Source File: HeaderValueHolder.java From gocd with Apache License 2.0 | 4 votes |
public void addValueArray(Object values) { CollectionUtils.mergeArrayIntoCollection(values, this.values); }
Example 12
Source File: HeaderValueHolder.java From spring4-understanding with Apache License 2.0 | 4 votes |
public void addValueArray(Object values) { CollectionUtils.mergeArrayIntoCollection(values, this.values); }
Example 13
Source File: HeaderValueHolder.java From spring4-understanding with Apache License 2.0 | 4 votes |
public void addValueArray(Object values) { CollectionUtils.mergeArrayIntoCollection(values, this.values); }
Example 14
Source File: HandlerExecutionChain.java From lams with GNU General Public License v2.0 | 4 votes |
public void addInterceptors(HandlerInterceptor... interceptors) { if (!ObjectUtils.isEmpty(interceptors)) { CollectionUtils.mergeArrayIntoCollection(interceptors, initInterceptorList()); } }
Example 15
Source File: HeaderValueHolder.java From java-technology-stack with MIT License | 4 votes |
public void addValueArray(Object values) { CollectionUtils.mergeArrayIntoCollection(values, this.values); }
Example 16
Source File: HandlerExecutionChain.java From java-technology-stack with MIT License | 4 votes |
public void addInterceptors(HandlerInterceptor... interceptors) { if (!ObjectUtils.isEmpty(interceptors)) { CollectionUtils.mergeArrayIntoCollection(interceptors, initInterceptorList()); } }
Example 17
Source File: HeaderValueHolder.java From spring-analysis-note with MIT License | 4 votes |
public void addValueArray(Object values) { CollectionUtils.mergeArrayIntoCollection(values, this.values); }
Example 18
Source File: HeaderValueHolder.java From spring-analysis-note with MIT License | 4 votes |
public void addValueArray(Object values) { CollectionUtils.mergeArrayIntoCollection(values, this.values); }
Example 19
Source File: HandlerExecutionChain.java From spring-analysis-note with MIT License | 4 votes |
public void addInterceptors(HandlerInterceptor... interceptors) { if (!ObjectUtils.isEmpty(interceptors)) { CollectionUtils.mergeArrayIntoCollection(interceptors, initInterceptorList()); } }