Class IndexSlice
- java.lang.Object
-
- com._1c.g5.modeling.xtext.scoping.IndexSlice
-
- All Implemented Interfaces:
IIndexSlice
public class IndexSlice extends Object implements IIndexSlice
Default implementation ofIIndexSlice
-
-
Constructor Summary
Constructors Constructor Description IndexSlice(ISliceFilter predicate)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
addItem(long id, org.eclipse.xtext.resource.IEObjectDescription item)
Tries to add index element to index sliceSet<Long>
getItems()
Gets unique ids of index elements contained in this index sliceISliceFilter
getPredicate()
Gets specialISliceFilter
that determines elements in this index slice.boolean
removeItem(long id)
Tries to delete index element from index slice
-
-
-
Constructor Detail
-
IndexSlice
public IndexSlice(ISliceFilter predicate)
Constructor- Parameters:
predicate
- id of index slice predicate. SeeIIndexSlicePredicateService
, can't benull
-
-
Method Detail
-
getItems
public Set<Long> getItems()
Description copied from interface:IIndexSlice
Gets unique ids of index elements contained in this index slice- Specified by:
getItems
in interfaceIIndexSlice
- Returns:
- unique ids of index elements contained in this index slice, never
null
-
addItem
public boolean addItem(long id, org.eclipse.xtext.resource.IEObjectDescription item)
Description copied from interface:IIndexSlice
Tries to add index element to index slice- Specified by:
addItem
in interfaceIIndexSlice
- Parameters:
id
- special unique id for adding index elementitem
- index element for adding to index slice, can't benull
- Returns:
true
if index element was added to slice,false
if index element is not supported of this index slice. If index already has contained element with the sameid
thenfalse
will be returned and index won't change Supporting index items are determined by predicate fromIIndexSlice.getPredicate()
-
removeItem
public boolean removeItem(long id)
Description copied from interface:IIndexSlice
Tries to delete index element from index slice- Specified by:
removeItem
in interfaceIIndexSlice
- Parameters:
id
- special unique id for deleting index element- Returns:
true
if item was succeeded deleted,false
otherwise
-
getPredicate
public ISliceFilter getPredicate()
Description copied from interface:IIndexSlice
Gets specialISliceFilter
that determines elements in this index slice. ThisISliceFilter
is id of slice type- Specified by:
getPredicate
in interfaceIIndexSlice
- Returns:
- special
ISliceFilter
that determines elements in this index slice, can't benull
-
-