Class LightScopes
- java.lang.Object
- 
- com._1c.g5.modeling.xtext.scoping.LightScopes
 
- 
 public class LightScopes extends Object Set of useful classes resemblingScopesXtext class, rewritten to improve the performance.
- 
- 
Constructor SummaryConstructors Constructor Description LightScopes()
 - 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static Iterable<org.eclipse.xtext.resource.IEObjectDescription>concat(Iterable<org.eclipse.xtext.resource.IEObjectDescription>... sourсeScopes)Gets the scope iterable which is able to concatenate given iterables and iterate them in the original order.static Iterable<org.eclipse.xtext.resource.IEObjectDescription>concat(List<Iterable<org.eclipse.xtext.resource.IEObjectDescription>> sourсeScopes)Gets the scope iterable which is able to concatenate given iterables and iterate them in the original order.static <T> Iterable<T>filter(Iterable<T> sourceIterable, com.google.common.base.Predicate<? super T> predicate)Gets the scope iterable which is able to filter given source using the specified filtering predicate.static <T> Iterator<T>filteringIterator(Iterator<T> sourceIterator, com.google.common.base.Predicate<? super T> predicate)Creates filtering iterator.static <T> Iterable<org.eclipse.xtext.resource.IEObjectDescription>scopedElementsFor(Iterable<T> elements, com.google.common.base.Function<T,org.eclipse.xtext.naming.QualifiedName> nameComputation)Optimized version ofScopes.scopedElementsForfrom Xtext standard implementations.static <F,T>
 Iterable<T>transform(Iterable<F> sourceIterable, com.google.common.base.Function<? super F,? extends T> function)Gets an iterable that transforms given items, each item transformation produses exactly one result element.static <F,T>
 Iterable<T>transformOneToMany(Iterable<F> sourceIterable, com.google.common.base.Function<? super F,Iterable<T>> function)Gets an iterable that transforms given items, each item transformation could produce many target objects.
 
- 
- 
- 
Method Detail- 
concat@SafeVarargs public static Iterable<org.eclipse.xtext.resource.IEObjectDescription> concat(Iterable<org.eclipse.xtext.resource.IEObjectDescription>... sourсeScopes) Gets the scope iterable which is able to concatenate given iterables and iterate them in the original order.- Parameters:
- sour\u0441eScopes- Source scope iterables.
- Returns:
- The concatenated iterable.
 
 - 
concatpublic static Iterable<org.eclipse.xtext.resource.IEObjectDescription> concat(List<Iterable<org.eclipse.xtext.resource.IEObjectDescription>> sourсeScopes) Gets the scope iterable which is able to concatenate given iterables and iterate them in the original order.- Parameters:
- sour\u0441eScopes- Source scope iterables.
- Returns:
- The concatenated iterable.
 
 - 
filterpublic static <T> Iterable<T> filter(Iterable<T> sourceIterable, com.google.common.base.Predicate<? super T> predicate) Gets the scope iterable which is able to filter given source using the specified filtering predicate.- Parameters:
- sourceIterable- Source scope iterable.
- predicate- Filtering predicate.
- Returns:
- The concatenated iterable.
 
 - 
filteringIteratorpublic static <T> Iterator<T> filteringIterator(Iterator<T> sourceIterator, com.google.common.base.Predicate<? super T> predicate) Creates filtering iterator.- Parameters:
- sourceIterable- The s++ource iterable.
- predicate- The filtering predicate/
- Returns:
- The iterator which filters through the given iterable.
 
 - 
scopedElementsForpublic static <T> Iterable<org.eclipse.xtext.resource.IEObjectDescription> scopedElementsFor(Iterable<T> elements, com.google.common.base.Function<T,org.eclipse.xtext.naming.QualifiedName> nameComputation) Optimized version ofScopes.scopedElementsForfrom Xtext standard implementations.- Parameters:
- elements- The source elements to create scoped iterable for.
- nameComputation- The qualified name providing function.
- Returns:
- The iterable scope.
 
 - 
transformpublic static <F,T> Iterable<T> transform(Iterable<F> sourceIterable, com.google.common.base.Function<? super F,? extends T> function) Gets an iterable that transforms given items, each item transformation produses exactly one result element.- Parameters:
- sourceIterable- The source iterable.
- function- The transforming function.
- Returns:
- The iterable with transformed elements.
 
 - 
transformOneToManypublic static <F,T> Iterable<T> transformOneToMany(Iterable<F> sourceIterable, com.google.common.base.Function<? super F,Iterable<T>> function) Gets an iterable that transforms given items, each item transformation could produce many target objects.- Parameters:
- sourceIterable- The source iterable.
- function- The transforming function.
- Returns:
- The iterable with transformed elements.
 
 
- 
 
-