Changeset 0067c8d


Ignore:
Timestamp:
Apr 20, 2016 12:59:24 PM (6 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
436fee9
Parents:
0d19fe4
Message:

Blockfile: Add generics, part 3

Location:
core/java/src/net/metanotion
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • core/java/src/net/metanotion/io/block/BlockFile.java

    r0d19fe4 r0067c8d  
    443443         *  @return null if not found
    444444         */
     445        @SuppressWarnings("unchecked")
    445446        public <K extends Comparable<? super K>, V> BSkipList<K, V> getIndex(String name, Serializer<K> key, Serializer<V> val) throws IOException {
    446447                // added I2P
  • core/java/src/net/metanotion/io/block/index/BSkipLevels.java

    r0d19fe4 r0067c8d  
    7474         *  level and init() was previously called.
    7575         */
     76        @SuppressWarnings("unchecked")
    7677        public BSkipLevels(BlockFile bf, int levelPage, BSkipList<K, V> bsl) throws IOException {
    7778                this.levelPage = levelPage;
     
    379380         */
    380381        @Override
     382        @SuppressWarnings("unchecked")
    381383        public boolean blvlck(boolean fix, int width, SkipLevels<K, V>[] prevLevels) {
    382384                bf.log.warn("    Skip level at width " + width);
  • core/java/src/net/metanotion/io/block/index/BSkipSpan.java

    r0d19fe4 r0067c8d  
    288288         * @param flushOnError set to false if you are going to flush anyway
    289289         */
     290        @SuppressWarnings("unchecked")
    290291        protected void loadData(boolean flushOnError) throws IOException {
    291292                if (isKilled)
  • core/java/src/net/metanotion/io/block/index/IBSkipSpan.java

    r0d19fe4 r0067c8d  
    6060
    6161        @Override
     62        @SuppressWarnings("unchecked")
    6263        public SkipSpan<K, V> newInstance(SkipList<K, V> sl) {
    6364                if (bf.log.shouldLog(Log.DEBUG))
  • core/java/src/net/metanotion/util/skiplist/SkipLevels.java

    r0d19fe4 r0067c8d  
    6363         *  @throws IllegalArgumentException if size too big or too small
    6464         */
     65        @SuppressWarnings("unchecked")
    6566        public SkipLevels(int size, SkipSpan<K, V> span) {
    6667                if(size < 1 || size > MAX_SIZE)
     
    130131         *          rv is null if no object was removed.
    131132         */
     133        @SuppressWarnings("unchecked")
    132134        public Object[] remove(int start, K key, SkipList<K, V> sl) {
    133135                Object[] res = null;
  • core/java/src/net/metanotion/util/skiplist/SkipList.java

    r0d19fe4 r0067c8d  
    9696        }
    9797
     98        @SuppressWarnings("unchecked")
    9899        public void put(K key, V val)   {
    99100                if(key == null) { throw new NullPointerException(); }
     
    117118        }
    118119
     120        @SuppressWarnings("unchecked")
    119121        public Object remove(K key) {
    120122                if(key == null) { throw new NullPointerException(); }
  • core/java/src/net/metanotion/util/skiplist/SkipSpan.java

    r0d19fe4 r0067c8d  
    5151         *  @throws IllegalArgumentException if size too big or too small
    5252         */
     53        @SuppressWarnings("unchecked")
    5354        public SkipSpan(int size) {
    5455                if(size < 1 || size > MAX_SIZE)
Note: See TracChangeset for help on using the changeset viewer.