本文整理匯總了Java中com.google.common.collect.RangeSet.addAll方法的典型用法代碼示例。如果您正苦於以下問題:Java RangeSet.addAll方法的具體用法?Java RangeSet.addAll怎麽用?Java RangeSet.addAll使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.google.common.collect.RangeSet
的用法示例。
在下文中一共展示了RangeSet.addAll方法的12個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: parseMinute
import com.google.common.collect.RangeSet; //導入方法依賴的package包/類
private RangeSet<Integer> parseMinute() {
RangeSet<Integer> minutes = TreeRangeSet.create();
for (String component : getComponents(rawMinute)) {
minutes.addAll(parseComponent(MINUTE, component));
}
return ImmutableRangeSet.copyOf(minutes);
}
示例2: parseHour
import com.google.common.collect.RangeSet; //導入方法依賴的package包/類
private RangeSet<Integer> parseHour() {
RangeSet<Integer> hours = TreeRangeSet.create();
for (String component : getComponents(rawHour)) {
hours.addAll(parseComponent(HOUR, component));
}
return ImmutableRangeSet.copyOf(hours);
}
示例3: parseDayOfWeek
import com.google.common.collect.RangeSet; //導入方法依賴的package包/類
private RangeSet<Integer> parseDayOfWeek() {
RangeSet<Integer> daysOfWeek = TreeRangeSet.create();
for (String component : getComponents(rawDayOfWeek)) {
daysOfWeek.addAll(parseComponent(DAY_OF_WEEK, replaceNameAliases(component, DAY_NAMES)));
}
return ImmutableRangeSet.copyOf(daysOfWeek);
}
示例4: parseMonth
import com.google.common.collect.RangeSet; //導入方法依賴的package包/類
private RangeSet<Integer> parseMonth() {
RangeSet<Integer> months = TreeRangeSet.create();
for (String component : getComponents(rawMonth)) {
months.addAll(parseComponent(MONTH, replaceNameAliases(component, MONTH_NAMES)));
}
return ImmutableRangeSet.copyOf(months);
}
示例5: parseDayOfMonth
import com.google.common.collect.RangeSet; //導入方法依賴的package包/類
private RangeSet<Integer> parseDayOfMonth() {
RangeSet<Integer> daysOfMonth = TreeRangeSet.create();
for (String component : getComponents(rawDayOfMonth)) {
daysOfMonth.addAll(parseComponent(DAY_OF_MONTH, component));
}
return ImmutableRangeSet.copyOf(daysOfMonth);
}
示例6: positiveFn
import com.google.common.collect.RangeSet; //導入方法依賴的package包/類
public static CodePointSet positiveFn(Set<RangeRep> ranges) {
RangeSet<Integer> rangeSet = TreeRangeSet.create();
for ( RangeRep rangeRep : ranges ) {
rangeSet.addAll( rangeRep.getRangeSet() );
}
return CodePointSet.range( RangeRep.of( rangeSet ) );
}
示例7: intersectionThis
import com.google.common.collect.RangeSet; //導入方法依賴的package包/類
public void intersectionThis(P2PBlobRangeSet otherRangeSet) {
RangeSet<Integer> intersection=TreeRangeSet.create();
for(Range<Integer> otherRange: otherRangeSet.ranges.asRanges()){
intersection.addAll(ranges.subRangeSet(otherRange));
}
ranges=intersection;
}
示例8: add
import com.google.common.collect.RangeSet; //導入方法依賴的package包/類
EncodedDiscreteResources add(EncodedDiscreteResources other) {
checkArgument(this.codec.getClass() == other.codec.getClass());
RangeSet<Integer> newRangeSet = TreeRangeSet.create(this.rangeSet);
newRangeSet.addAll(other.rangeSet);
return new EncodedDiscreteResources(newRangeSet, this.codec);
}
示例9: rangeSetIntersection
import com.google.common.collect.RangeSet; //導入方法依賴的package包/類
public CharacterClassRangeSet rangeSetIntersection(CharacterClassRangeSet other) {
final RangeSet<Integer> mutableRangeSet = TreeRangeSet.create();
for(Range<Integer> range : this.rangeSet.asRanges()) {
mutableRangeSet.addAll(other.rangeSet.subRangeSet(range));
}
boolean containsEOF = this.containsEOF && other.containsEOF;
return new CharacterClassRangeSet(ImmutableRangeSet.copyOf(mutableRangeSet), containsEOF);
}
示例10: add
import com.google.common.collect.RangeSet; //導入方法依賴的package包/類
/**
* This add method gradually removes scan-ranges from the input range as it
* descends down the hierarchy.
* @param range
*/
public void add(LCMSRange range) {
Integer msLevel = range.getMsLevel();
DoubleRange mzRange = range.getMzRange();
Range<Integer> scanRange = range.getScanRange();
if (msLevel == null) {
// add to the top level range set
anyLvlSet.add(scanRange);
// remove from all underlying sets
for (Map.Entry<Integer, MsLevelRangeSet> lvlMapEntry : lvlMap.entrySet()) {
MsLevelRangeSet msLevelRangeSet = lvlMapEntry.getValue();
msLevelRangeSet.removeFromAll(range);
}
return;
}
TreeRangeSet<Integer> scanRangeLeft = TreeRangeSet.create();
scanRangeLeft.removeAll(anyLvlSet);
if (scanRangeLeft.isEmpty()) {
return; // if there's nothing left in the scan range, just stop
}
MsLevelRangeSet msLvlRanges = lvlMap.get(msLevel);
if (msLvlRanges == null) {
msLvlRanges = new MsLevelRangeSet();
lvlMap.put(msLevel, msLvlRanges);
}
if (mzRange == null) {
// add to any-mz-range range set
msLvlRanges.anyPrecursorSet.addAll(scanRangeLeft);
// remove from all specific mz-range sets
msLvlRanges.removeFromSpecific(range);
return;
}
scanRangeLeft.removeAll(msLvlRanges.anyPrecursorSet);
if (scanRangeLeft.isEmpty()) {
return;
}
RangeSet<Integer> rangeSetForMzRange = msLvlRanges.rngMap.get(mzRange);
if (rangeSetForMzRange == null) {
rangeSetForMzRange = TreeRangeSet.create();
msLvlRanges.rngMap.put(mzRange, rangeSetForMzRange);
}
rangeSetForMzRange.addAll(scanRangeLeft);
}
示例11: rangeSetUnion
import com.google.common.collect.RangeSet; //導入方法依賴的package包/類
public final CharacterClassRangeSet rangeSetUnion(CharacterClassRangeSet other) {
final RangeSet<Integer> mutableRangeSet = TreeRangeSet.create();
mutableRangeSet.addAll(this.rangeSet);
mutableRangeSet.addAll(other.rangeSet);
boolean containsEOF = this.containsEOF || other.containsEOF;
return new CharacterClassRangeSet(ImmutableRangeSet.copyOf(mutableRangeSet), containsEOF);
}
示例12: rangeSetDifference
import com.google.common.collect.RangeSet; //導入方法依賴的package包/類
public CharacterClassRangeSet rangeSetDifference(CharacterClassRangeSet other) {
final RangeSet<Integer> mutableRangeSet = TreeRangeSet.create();
mutableRangeSet.addAll(other.rangeSet);
mutableRangeSet.removeAll(this.rangeSet);
boolean containsEOF = other.containsEOF && !this.containsEOF;
return new CharacterClassRangeSet(ImmutableRangeSet.copyOf(mutableRangeSet), containsEOF);
}