本文整理汇总了Java中com.google.common.collect.ImmutableRangeSet.copyOf方法的典型用法代码示例。如果您正苦于以下问题:Java ImmutableRangeSet.copyOf方法的具体用法?Java ImmutableRangeSet.copyOf怎么用?Java ImmutableRangeSet.copyOf使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.common.collect.ImmutableRangeSet
的用法示例。
在下文中一共展示了ImmutableRangeSet.copyOf方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: CrontabEntry
import com.google.common.collect.ImmutableRangeSet; //导入方法依赖的package包/类
private CrontabEntry(
RangeSet<Integer> minute,
RangeSet<Integer> hour,
RangeSet<Integer> dayOfMonth,
RangeSet<Integer> month,
RangeSet<Integer> dayOfWeek) {
checkEnclosed("minute", MINUTE, minute);
checkEnclosed("hour", HOUR, hour);
checkEnclosed("dayOfMonth", DAY_OF_MONTH, dayOfMonth);
checkEnclosed("month", MONTH, month);
checkEnclosed("dayOfWeek", DAY_OF_WEEK, dayOfWeek);
this.minute = ImmutableRangeSet.copyOf(minute);
this.hour = ImmutableRangeSet.copyOf(hour);
this.dayOfMonth = ImmutableRangeSet.copyOf(dayOfMonth);
this.month = ImmutableRangeSet.copyOf(month);
this.dayOfWeek = ImmutableRangeSet.copyOf(dayOfWeek);
checkArgument(hasWildcardDayOfMonth() || hasWildcardDayOfWeek(),
"Specifying both dayOfWeek and dayOfMonth is not supported.");
}
示例2: FrontendHistoryMetadata
import com.google.common.collect.ImmutableRangeSet; //导入方法依赖的package包/类
public FrontendHistoryMetadata(final long historyId, final long cookie, final boolean closed,
final Map<UnsignedLong, Boolean> closedTransactions, final RangeSet<UnsignedLong> purgedTransactions) {
this.historyId = historyId;
this.cookie = cookie;
this.closed = closed;
this.closedTransactions = ImmutableMap.copyOf(closedTransactions);
this.purgedTransactions = ImmutableRangeSet.copyOf(purgedTransactions);
}
示例3: parseMinute
import com.google.common.collect.ImmutableRangeSet; //导入方法依赖的package包/类
private RangeSet<Integer> parseMinute() {
RangeSet<Integer> minutes = TreeRangeSet.create();
for (String component : getComponents(rawMinute)) {
minutes.addAll(parseComponent(MINUTE, component));
}
return ImmutableRangeSet.copyOf(minutes);
}
示例4: parseHour
import com.google.common.collect.ImmutableRangeSet; //导入方法依赖的package包/类
private RangeSet<Integer> parseHour() {
RangeSet<Integer> hours = TreeRangeSet.create();
for (String component : getComponents(rawHour)) {
hours.addAll(parseComponent(HOUR, component));
}
return ImmutableRangeSet.copyOf(hours);
}
示例5: parseDayOfWeek
import com.google.common.collect.ImmutableRangeSet; //导入方法依赖的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);
}
示例6: parseMonth
import com.google.common.collect.ImmutableRangeSet; //导入方法依赖的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);
}
示例7: parseDayOfMonth
import com.google.common.collect.ImmutableRangeSet; //导入方法依赖的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);
}
示例8: addRange
import com.google.common.collect.ImmutableRangeSet; //导入方法依赖的package包/类
protected final CharacterClassRangeSet addRange(int from, int to) {
final RangeSet<Integer> mutableRangeSet = TreeRangeSet.create(rangeSet);
mutableRangeSet.add(Range.closed(from, Math.min(255, to)));
return new CharacterClassRangeSet(ImmutableRangeSet.copyOf(mutableRangeSet),
containsEOF || to == CharacterClassFactory.EOF_INT);
}
示例9: addSingle
import com.google.common.collect.ImmutableRangeSet; //导入方法依赖的package包/类
protected final CharacterClassRangeSet addSingle(int character) {
final RangeSet<Integer> mutableRangeSet = TreeRangeSet.create(rangeSet);
if(character < CharacterClassFactory.EOF_INT)
mutableRangeSet.add(Range.singleton(character));
return new CharacterClassRangeSet(ImmutableRangeSet.copyOf(mutableRangeSet),
containsEOF || character == CharacterClassFactory.EOF_INT);
}
示例10: removeSingle
import com.google.common.collect.ImmutableRangeSet; //导入方法依赖的package包/类
protected final CharacterClassRangeSet removeSingle(int character) {
final RangeSet<Integer> mutableRangeSet = TreeRangeSet.create(rangeSet);
if(character < CharacterClassFactory.EOF_INT)
mutableRangeSet.remove(Range.open(character - 1, character + 1));
return new CharacterClassRangeSet(ImmutableRangeSet.copyOf(mutableRangeSet),
containsEOF && character != CharacterClassFactory.EOF_INT);
}
示例11: rangeSetIntersection
import com.google.common.collect.ImmutableRangeSet; //导入方法依赖的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);
}
示例12: toImmutable
import com.google.common.collect.ImmutableRangeSet; //导入方法依赖的package包/类
public RangeSet<UnsignedLong> toImmutable() {
return ImmutableRangeSet.copyOf(rangeset);
}
示例13: FrontendClientMetadata
import com.google.common.collect.ImmutableRangeSet; //导入方法依赖的package包/类
public FrontendClientMetadata(final ClientIdentifier identifier, final RangeSet<UnsignedLong> purgedHistories,
final Collection<FrontendHistoryMetadata> currentHistories) {
this.identifier = Preconditions.checkNotNull(identifier);
this.purgedHistories = ImmutableRangeSet.copyOf(purgedHistories);
this.currentHistories = ImmutableList.copyOf(currentHistories);
}
示例14: DeadTransactionException
import com.google.common.collect.ImmutableRangeSet; //导入方法依赖的package包/类
public DeadTransactionException(final RangeSet<UnsignedLong> purgedIdentifiers) {
super("Transactions " + purgedIdentifiers + " have been purged");
this.purgedIdentifiers = ImmutableRangeSet.copyOf(purgedIdentifiers);
}
示例15: ResolvedRangeConstraint
import com.google.common.collect.ImmutableRangeSet; //导入方法依赖的package包/类
ResolvedRangeConstraint(final ConstraintMetaDefinition meta, final RangeSet<T> ranges) {
this.meta = requireNonNull(meta);
this.ranges = ImmutableRangeSet.copyOf(ranges);
}