Java 类com.google.common.collect.SortedLists.KeyPresentBehavior 实例源码

项目:guava-mock    文件:ImmutableRangeMap.java   
@Override
@Nullable
public V get(K key) {
  int index =
      SortedLists.binarySearch(
          ranges,
          Range.<K>lowerBoundFn(),
          Cut.belowValue(key),
          KeyPresentBehavior.ANY_PRESENT,
          KeyAbsentBehavior.NEXT_LOWER);
  if (index == -1) {
    return null;
  } else {
    Range<K> range = ranges.get(index);
    return range.contains(key) ? values.get(index) : null;
  }
}
项目:guava-mock    文件:ImmutableRangeMap.java   
@Override
@Nullable
public Map.Entry<Range<K>, V> getEntry(K key) {
  int index =
      SortedLists.binarySearch(
          ranges,
          Range.<K>lowerBoundFn(),
          Cut.belowValue(key),
          KeyPresentBehavior.ANY_PRESENT,
          KeyAbsentBehavior.NEXT_LOWER);
  if (index == -1) {
    return null;
  } else {
    Range<K> range = ranges.get(index);
    return range.contains(key) ? Maps.immutableEntry(range, values.get(index)) : null;
  }
}
项目:googles-monorepo-demo    文件:ImmutableRangeMap.java   
@Override
@Nullable
public V get(K key) {
  int index =
      SortedLists.binarySearch(
          ranges,
          Range.<K>lowerBoundFn(),
          Cut.belowValue(key),
          KeyPresentBehavior.ANY_PRESENT,
          KeyAbsentBehavior.NEXT_LOWER);
  if (index == -1) {
    return null;
  } else {
    Range<K> range = ranges.get(index);
    return range.contains(key) ? values.get(index) : null;
  }
}
项目:googles-monorepo-demo    文件:ImmutableRangeMap.java   
@Override
@Nullable
public Map.Entry<Range<K>, V> getEntry(K key) {
  int index =
      SortedLists.binarySearch(
          ranges,
          Range.<K>lowerBoundFn(),
          Cut.belowValue(key),
          KeyPresentBehavior.ANY_PRESENT,
          KeyAbsentBehavior.NEXT_LOWER);
  if (index == -1) {
    return null;
  } else {
    Range<K> range = ranges.get(index);
    return range.contains(key) ? Maps.immutableEntry(range, values.get(index)) : null;
  }
}
项目:codebuff    文件:ImmutableRangeMap.java   
@Override
@Nullable
public V get(K key) {
  int index =
      SortedLists.binarySearch(
          ranges,
          Range.<K>lowerBoundFn(),
          Cut.belowValue(key),
          KeyPresentBehavior.ANY_PRESENT,
          KeyAbsentBehavior.NEXT_LOWER);
  if (index == -1) {
    return null;
  } else {
    Range<K> range = ranges.get(index);
    return range.contains(key) ? values.get(index) : null;
  }
}
项目:codebuff    文件:ImmutableRangeMap.java   
@Override
@Nullable
public Map.Entry<Range<K>, V> getEntry(K key) {
  int index =
      SortedLists.binarySearch(
          ranges,
          Range.<K>lowerBoundFn(),
          Cut.belowValue(key),
          KeyPresentBehavior.ANY_PRESENT,
          KeyAbsentBehavior.NEXT_LOWER);
  if (index == -1) {
    return null;
  } else {
    Range<K> range = ranges.get(index);
    return range.contains(key) ? Maps.immutableEntry(range, values.get(index)) : null;
  }
}
项目:guava    文件:ImmutableRangeMap.java   
@Override
@NullableDecl
public V get(K key) {
  int index =
      SortedLists.binarySearch(
          ranges,
          Range.<K>lowerBoundFn(),
          Cut.belowValue(key),
          KeyPresentBehavior.ANY_PRESENT,
          KeyAbsentBehavior.NEXT_LOWER);
  if (index == -1) {
    return null;
  } else {
    Range<K> range = ranges.get(index);
    return range.contains(key) ? values.get(index) : null;
  }
}
项目:guava    文件:ImmutableRangeMap.java   
@Override
@NullableDecl
public Entry<Range<K>, V> getEntry(K key) {
  int index =
      SortedLists.binarySearch(
          ranges,
          Range.<K>lowerBoundFn(),
          Cut.belowValue(key),
          KeyPresentBehavior.ANY_PRESENT,
          KeyAbsentBehavior.NEXT_LOWER);
  if (index == -1) {
    return null;
  } else {
    Range<K> range = ranges.get(index);
    return range.contains(key) ? Maps.immutableEntry(range, values.get(index)) : null;
  }
}
项目:guava    文件:ImmutableRangeMap.java   
@Override
@NullableDecl
public V get(K key) {
  int index =
      SortedLists.binarySearch(
          ranges,
          Range.<K>lowerBoundFn(),
          Cut.belowValue(key),
          KeyPresentBehavior.ANY_PRESENT,
          KeyAbsentBehavior.NEXT_LOWER);
  if (index == -1) {
    return null;
  } else {
    Range<K> range = ranges.get(index);
    return range.contains(key) ? values.get(index) : null;
  }
}
项目:guava    文件:ImmutableRangeMap.java   
@Override
@NullableDecl
public Entry<Range<K>, V> getEntry(K key) {
  int index =
      SortedLists.binarySearch(
          ranges,
          Range.<K>lowerBoundFn(),
          Cut.belowValue(key),
          KeyPresentBehavior.ANY_PRESENT,
          KeyAbsentBehavior.NEXT_LOWER);
  if (index == -1) {
    return null;
  } else {
    Range<K> range = ranges.get(index);
    return range.contains(key) ? Maps.immutableEntry(range, values.get(index)) : null;
  }
}
项目:guava-mock    文件:SortedListsTest.java   
public void testWithoutDups() {
  for (KeyPresentBehavior presentBehavior : KeyPresentBehavior.values()) {
    for (KeyAbsentBehavior absentBehavior : KeyAbsentBehavior.values()) {
      for (int key = 0; key <= 10; key++) {
        assertModelAgrees(LIST_WITHOUT_DUPS, key,
            SortedLists.binarySearch(LIST_WITHOUT_DUPS, key, presentBehavior, absentBehavior),
            presentBehavior, absentBehavior);
      }
    }
  }
}
项目:guava-mock    文件:SortedListsTest.java   
public void testWithDups() {
  for (KeyPresentBehavior presentBehavior : KeyPresentBehavior.values()) {
    for (KeyAbsentBehavior absentBehavior : KeyAbsentBehavior.values()) {
      for (int key = 0; key <= 10; key++) {
        assertModelAgrees(LIST_WITH_DUPS, key,
            SortedLists.binarySearch(LIST_WITH_DUPS, key, presentBehavior, absentBehavior),
            presentBehavior, absentBehavior);
      }
    }
  }
}
项目:googles-monorepo-demo    文件:SortedListsTest.java   
public void testWithoutDups() {
  for (KeyPresentBehavior presentBehavior : KeyPresentBehavior.values()) {
    for (KeyAbsentBehavior absentBehavior : KeyAbsentBehavior.values()) {
      for (int key = 0; key <= 10; key++) {
        assertModelAgrees(LIST_WITHOUT_DUPS, key,
            SortedLists.binarySearch(LIST_WITHOUT_DUPS, key, presentBehavior, absentBehavior),
            presentBehavior, absentBehavior);
      }
    }
  }
}
项目:googles-monorepo-demo    文件:SortedListsTest.java   
public void testWithDups() {
  for (KeyPresentBehavior presentBehavior : KeyPresentBehavior.values()) {
    for (KeyAbsentBehavior absentBehavior : KeyAbsentBehavior.values()) {
      for (int key = 0; key <= 10; key++) {
        assertModelAgrees(LIST_WITH_DUPS, key,
            SortedLists.binarySearch(LIST_WITH_DUPS, key, presentBehavior, absentBehavior),
            presentBehavior, absentBehavior);
      }
    }
  }
}
项目:codebuff    文件:ImmutableRangeMap.java   
@Override
@Nullable
public V get(K key) {
  int index = SortedLists.binarySearch(ranges, Range.<K>lowerBoundFn(), Cut.belowValue(key), KeyPresentBehavior.ANY_PRESENT, KeyAbsentBehavior.NEXT_LOWER);
  if (index == -1) {
    return null;
  } else {
    Range<K> range = ranges.get(index);
    return range.contains(key) ? values.get(index) : null;
  }
}
项目:codebuff    文件:ImmutableRangeMap.java   
@Override
@Nullable
public Map.Entry<Range<K>, V> getEntry(K key) {
  int index = SortedLists.binarySearch(ranges, Range.<K>lowerBoundFn(), Cut.belowValue(key), KeyPresentBehavior.ANY_PRESENT, KeyAbsentBehavior.NEXT_LOWER);
  if (index == -1) {
    return null;
  } else {
    Range<K> range = ranges.get(index);
    return range.contains(key) ? Maps.immutableEntry(range, values.get(index)) : null;
  }
}
项目:codebuff    文件:ImmutableRangeMap.java   
@Override
@Nullable
public V get(K key) {
  int index = SortedLists.binarySearch(ranges, Range.<K>lowerBoundFn(), Cut.belowValue(key), KeyPresentBehavior.ANY_PRESENT, KeyAbsentBehavior.NEXT_LOWER);
  if (index == -1) {
    return null;
  } else {
    Range<K> range = ranges.get(index);
    return range.contains(key) ? values.get(index) : null;
  }
}
项目:codebuff    文件:ImmutableRangeMap.java   
@Override
@Nullable
public Map.Entry<Range<K>, V> getEntry(K key) {
  int index = SortedLists.binarySearch(ranges, Range.<K>lowerBoundFn(), Cut.belowValue(key), KeyPresentBehavior.ANY_PRESENT, KeyAbsentBehavior.NEXT_LOWER);
  if (index == -1) {
    return null;
  } else {
    Range<K> range = ranges.get(index);
    return range.contains(key) ? Maps.immutableEntry(range, values.get(index)) : null;
  }
}
项目:codebuff    文件:ImmutableRangeMap.java   
@Override
@Nullable
public V get(K key) {
  int index = SortedLists.binarySearch(ranges, Range.<K>lowerBoundFn(), Cut.belowValue(key), KeyPresentBehavior.ANY_PRESENT, KeyAbsentBehavior.NEXT_LOWER);
  if (index == -1) {
    return null;
  } else {
    Range<K> range = ranges.get(index);
    return range.contains(key) ? values.get(index) : null;
  }
}
项目:codebuff    文件:ImmutableRangeMap.java   
@Override
@Nullable
public Map.Entry<Range<K>, V> getEntry(K key) {
  int index = SortedLists.binarySearch(ranges, Range.<K>lowerBoundFn(), Cut.belowValue(key), KeyPresentBehavior.ANY_PRESENT, KeyAbsentBehavior.NEXT_LOWER);
  if (index == -1) {
    return null;
  } else {
    Range<K> range = ranges.get(index);
    return range.contains(key) ? Maps.immutableEntry(range, values.get(index)) : null;
  }
}
项目:codebuff    文件:ImmutableRangeMap.java   
@Override
@Nullable
public V get(K key) {
  int index = SortedLists.binarySearch(ranges, Range.<K>lowerBoundFn(), Cut.belowValue(key), KeyPresentBehavior.ANY_PRESENT, KeyAbsentBehavior.NEXT_LOWER);
  if (index == -1) {
    return null;
  } else {
    Range<K> range = ranges.get(index);
    return range.contains(key) ? values.get(index) : null;
  }
}
项目:codebuff    文件:ImmutableRangeMap.java   
@Override
@Nullable
public Map.Entry<Range<K>, V> getEntry(K key) {
  int index = SortedLists.binarySearch(ranges, Range.<K>lowerBoundFn(), Cut.belowValue(key), KeyPresentBehavior.ANY_PRESENT, KeyAbsentBehavior.NEXT_LOWER);
  if (index == -1) {
    return null;
  } else {
    Range<K> range = ranges.get(index);
    return range.contains(key) ? Maps.immutableEntry(range, values.get(index)) : null;
  }
}
项目:bts    文件:ImmutableRangeMap.java   
@Override
@Nullable
public V get(K key) {
  int index = SortedLists.binarySearch(ranges, Range.<K>lowerBoundFn(),
      Cut.belowValue(key), KeyPresentBehavior.ANY_PRESENT, KeyAbsentBehavior.NEXT_LOWER);
  if (index == -1) {
    return null;
  } else {
    Range<K> range = ranges.get(index);
    return range.contains(key) ? values.get(index) : null;
  }
}
项目:bts    文件:ImmutableRangeMap.java   
@Override
@Nullable
public Map.Entry<Range<K>, V> getEntry(K key) {
  int index = SortedLists.binarySearch(ranges, Range.<K>lowerBoundFn(),
      Cut.belowValue(key), KeyPresentBehavior.ANY_PRESENT, KeyAbsentBehavior.NEXT_LOWER);
  if (index == -1) {
    return null;
  } else {
    Range<K> range = ranges.get(index);
    return range.contains(key) ? Maps.immutableEntry(range, values.get(index)) : null;
  }
}
项目:j2objc    文件:ImmutableRangeMap.java   
@Override
@Nullable
public V get(K key) {
  int index = SortedLists.binarySearch(ranges, Range.<K>lowerBoundFn(),
      Cut.belowValue(key), KeyPresentBehavior.ANY_PRESENT, KeyAbsentBehavior.NEXT_LOWER);
  if (index == -1) {
    return null;
  } else {
    Range<K> range = ranges.get(index);
    return range.contains(key) ? values.get(index) : null;
  }
}
项目:j2objc    文件:ImmutableRangeMap.java   
@Override
@Nullable
public Map.Entry<Range<K>, V> getEntry(K key) {
  int index = SortedLists.binarySearch(ranges, Range.<K>lowerBoundFn(),
      Cut.belowValue(key), KeyPresentBehavior.ANY_PRESENT, KeyAbsentBehavior.NEXT_LOWER);
  if (index == -1) {
    return null;
  } else {
    Range<K> range = ranges.get(index);
    return range.contains(key) ? Maps.immutableEntry(range, values.get(index)) : null;
  }
}
项目:guava-libraries    文件:ImmutableRangeMap.java   
@Override
@Nullable
public V get(K key) {
  int index = SortedLists.binarySearch(ranges, Range.<K>lowerBoundFn(),
      Cut.belowValue(key), KeyPresentBehavior.ANY_PRESENT, KeyAbsentBehavior.NEXT_LOWER);
  if (index == -1) {
    return null;
  } else {
    Range<K> range = ranges.get(index);
    return range.contains(key) ? values.get(index) : null;
  }
}
项目:guava-libraries    文件:ImmutableRangeMap.java   
@Override
@Nullable
public Map.Entry<Range<K>, V> getEntry(K key) {
  int index = SortedLists.binarySearch(ranges, Range.<K>lowerBoundFn(),
      Cut.belowValue(key), KeyPresentBehavior.ANY_PRESENT, KeyAbsentBehavior.NEXT_LOWER);
  if (index == -1) {
    return null;
  } else {
    Range<K> range = ranges.get(index);
    return range.contains(key) ? Maps.immutableEntry(range, values.get(index)) : null;
  }
}
项目:guava-libraries    文件:SortedListsTest.java   
public void testWithoutDups() {
  for (KeyPresentBehavior presentBehavior : KeyPresentBehavior.values()) {
    for (KeyAbsentBehavior absentBehavior : KeyAbsentBehavior.values()) {
      for (int key = 0; key <= 10; key++) {
        assertModelAgrees(LIST_WITHOUT_DUPS, key,
            SortedLists.binarySearch(LIST_WITHOUT_DUPS, key, presentBehavior, absentBehavior),
            presentBehavior, absentBehavior);
      }
    }
  }
}
项目:guava-libraries    文件:SortedListsTest.java   
public void testWithDups() {
  for (KeyPresentBehavior presentBehavior : KeyPresentBehavior.values()) {
    for (KeyAbsentBehavior absentBehavior : KeyAbsentBehavior.values()) {
      for (int key = 0; key <= 10; key++) {
        assertModelAgrees(LIST_WITH_DUPS, key,
            SortedLists.binarySearch(LIST_WITH_DUPS, key, presentBehavior, absentBehavior),
            presentBehavior, absentBehavior);
      }
    }
  }
}
项目:guava-libraries    文件:SortedListsTest.java   
public void testWithoutDups() {
  for (KeyPresentBehavior presentBehavior : KeyPresentBehavior.values()) {
    for (KeyAbsentBehavior absentBehavior : KeyAbsentBehavior.values()) {
      for (int key = 0; key <= 10; key++) {
        assertModelAgrees(LIST_WITHOUT_DUPS, key,
            SortedLists.binarySearch(LIST_WITHOUT_DUPS, key, presentBehavior, absentBehavior),
            presentBehavior, absentBehavior);
      }
    }
  }
}
项目:guava-libraries    文件:SortedListsTest.java   
public void testWithDups() {
  for (KeyPresentBehavior presentBehavior : KeyPresentBehavior.values()) {
    for (KeyAbsentBehavior absentBehavior : KeyAbsentBehavior.values()) {
      for (int key = 0; key <= 10; key++) {
        assertModelAgrees(LIST_WITH_DUPS, key,
            SortedLists.binarySearch(LIST_WITH_DUPS, key, presentBehavior, absentBehavior),
            presentBehavior, absentBehavior);
      }
    }
  }
}
项目:VectorAttackScanner    文件:ImmutableRangeMap.java   
@Override
@Nullable
public V get(K key) {
  int index = SortedLists.binarySearch(ranges, Range.<K>lowerBoundFn(),
      Cut.belowValue(key), KeyPresentBehavior.ANY_PRESENT, KeyAbsentBehavior.NEXT_LOWER);
  if (index == -1) {
    return null;
  } else {
    Range<K> range = ranges.get(index);
    return range.contains(key) ? values.get(index) : null;
  }
}
项目:VectorAttackScanner    文件:ImmutableRangeMap.java   
@Override
@Nullable
public Map.Entry<Range<K>, V> getEntry(K key) {
  int index = SortedLists.binarySearch(ranges, Range.<K>lowerBoundFn(),
      Cut.belowValue(key), KeyPresentBehavior.ANY_PRESENT, KeyAbsentBehavior.NEXT_LOWER);
  if (index == -1) {
    return null;
  } else {
    Range<K> range = ranges.get(index);
    return range.contains(key) ? Maps.immutableEntry(range, values.get(index)) : null;
  }
}
项目:guava    文件:SortedListsTest.java   
public void testWithoutDups() {
  for (KeyPresentBehavior presentBehavior : KeyPresentBehavior.values()) {
    for (KeyAbsentBehavior absentBehavior : KeyAbsentBehavior.values()) {
      for (int key = 0; key <= 10; key++) {
        assertModelAgrees(
            LIST_WITHOUT_DUPS,
            key,
            SortedLists.binarySearch(LIST_WITHOUT_DUPS, key, presentBehavior, absentBehavior),
            presentBehavior,
            absentBehavior);
      }
    }
  }
}
项目:guava    文件:SortedListsTest.java   
public void testWithDups() {
  for (KeyPresentBehavior presentBehavior : KeyPresentBehavior.values()) {
    for (KeyAbsentBehavior absentBehavior : KeyAbsentBehavior.values()) {
      for (int key = 0; key <= 10; key++) {
        assertModelAgrees(
            LIST_WITH_DUPS,
            key,
            SortedLists.binarySearch(LIST_WITH_DUPS, key, presentBehavior, absentBehavior),
            presentBehavior,
            absentBehavior);
      }
    }
  }
}
项目:guava    文件:SortedListsTest.java   
public void testWithoutDups() {
  for (KeyPresentBehavior presentBehavior : KeyPresentBehavior.values()) {
    for (KeyAbsentBehavior absentBehavior : KeyAbsentBehavior.values()) {
      for (int key = 0; key <= 10; key++) {
        assertModelAgrees(
            LIST_WITHOUT_DUPS,
            key,
            SortedLists.binarySearch(LIST_WITHOUT_DUPS, key, presentBehavior, absentBehavior),
            presentBehavior,
            absentBehavior);
      }
    }
  }
}
项目:guava    文件:SortedListsTest.java   
public void testWithDups() {
  for (KeyPresentBehavior presentBehavior : KeyPresentBehavior.values()) {
    for (KeyAbsentBehavior absentBehavior : KeyAbsentBehavior.values()) {
      for (int key = 0; key <= 10; key++) {
        assertModelAgrees(
            LIST_WITH_DUPS,
            key,
            SortedLists.binarySearch(LIST_WITH_DUPS, key, presentBehavior, absentBehavior),
            presentBehavior,
            absentBehavior);
      }
    }
  }
}
项目:cnGuava    文件:ImmutableRangeMap.java   
@Override
@Nullable
public V get(K key) {
  int index = SortedLists.binarySearch(ranges, Range.<K>lowerBoundFn(),
      Cut.belowValue(key), KeyPresentBehavior.ANY_PRESENT, KeyAbsentBehavior.NEXT_LOWER);
  if (index == -1) {
    return null;
  } else {
    Range<K> range = ranges.get(index);
    return range.contains(key) ? values.get(index) : null;
  }
}
项目:cnGuava    文件:ImmutableRangeMap.java   
@Override
@Nullable
public Map.Entry<Range<K>, V> getEntry(K key) {
  int index = SortedLists.binarySearch(ranges, Range.<K>lowerBoundFn(),
      Cut.belowValue(key), KeyPresentBehavior.ANY_PRESENT, KeyAbsentBehavior.NEXT_LOWER);
  if (index == -1) {
    return null;
  } else {
    Range<K> range = ranges.get(index);
    return range.contains(key) ? Maps.immutableEntry(range, values.get(index)) : null;
  }
}