border with mnemonic
[fedora-idea.git] / java / compiler / impl / src / com / intellij / compiler / make / ClassIdKeyDescriptor.java
blob1a594162b3d56be88a33237e648cf9cc460633a7
1 /*
2 * Copyright 2000-2009 JetBrains s.r.o.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
16 package com.intellij.compiler.make;
18 import com.intellij.util.io.KeyDescriptor;
20 import java.io.DataInput;
21 import java.io.DataOutput;
22 import java.io.IOException;
24 /**
25 * @author Eugene Zhuravlev
26 * Date: Dec 1, 2008
28 class ClassIdKeyDescriptor implements KeyDescriptor<StorageClassId> {
29 public static final ClassIdKeyDescriptor INSTANCE = new ClassIdKeyDescriptor();
31 public int getHashCode(StorageClassId value) {
32 return value.hashCode();
35 public boolean isEqual(StorageClassId val1, StorageClassId val2) {
36 return val1.equals(val2);
39 public void save(DataOutput out, StorageClassId value) throws IOException {
40 out.writeInt(value.getClassQName());
43 public StorageClassId read(DataInput in) throws IOException {
44 return new StorageClassId(in.readInt());