Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (C) 2011 the original author or authors. See the notice.md file distributed with this work for additional information regarding copyright ownership. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
 
 package org.iq80.leveldb.impl;
 
 
 
 import static com.google.common.base.Charsets.UTF_8;
 
 public class InternalEntry implements Entry<InternalKeySlice>
 {
     public static final Function<InternalEntryInternalKeyGET_KEY = new Function<InternalEntryInternalKey>()
     {
         @Override
         public InternalKey apply(InternalEntry internalEntry)
         {
             return internalEntry.getKey();
         }
     };
 
     private final InternalKey key;
     private final Slice value;
 
     public InternalEntry(InternalKey keySlice value)
     {
         Preconditions.checkNotNull(key"key is null");
         Preconditions.checkNotNull(value"value is null");
         this. = key;
         this. = value;
     }
 
     @Override
     public InternalKey getKey()
     {
         return ;
     }
 
     @Override
     public Slice getValue()
     {
         return ;
     }


    
 
     @Override
     public final Slice setValue(Slice value)
     {
         throw new UnsupportedOperationException();
     }
 
     @Override
     public boolean equals(Object o)
     {
         if (this == o) {
             return true;
         }
         if (o == null || getClass() != o.getClass()) {
             return false;
         }
 
         InternalEntry entry = (InternalEntryo;
 
         if (!.equals(entry.key)) {
             return false;
         }
         if (!.equals(entry.value)) {
             return false;
         }
 
         return true;
     }
 
     @Override
     public int hashCode()
     {
         int result = .hashCode();
         result = 31 * result + .hashCode();
         return result;
    }
    @Override
    public String toString()
    {
        final StringBuilder sb = new StringBuilder();
        sb.append("InternalEntry");
        sb.append("{key=").append();      // todo don't print the real value
        sb.append(", value=").append(.toString());
        sb.append('}');
        return sb.toString();
    }
New to GrepCode? Check out our FAQ X