net.anidb
Class FileState

java.lang.Object
  extended by net.anidb.FileState

public class FileState
extends java.lang.Object

The file state.

Version:
1.0, 07.12.2009
Author:
grizzlyxp (http://anidb.net/perl-bin/animedb.pl?show=userpage&uid=63935)
See Also:
File.getState(), File.setState(Integer)

Method Summary
 boolean equals(java.lang.Object obj)
           
static FileState getInstance(int value)
          Returns an instance of the class with the given value.
 int getValue()
          Returns the value.
 int hashCode()
           
 boolean isCensored()
          Returns the status, if the file is censored.
 boolean isCrcError()
          Returns the status, if the file didn't match the official CRC.
 boolean isCrcOk()
          Returns the status, if the file matched the official CRC.
 boolean isUncensored()
          Returns the status, if the file is uncensored.
 boolean isVersion2()
          Returns the status, if the file is version 2.
 boolean isVersion3()
          Returns the status, if the file is version 3.
 boolean isVersion4()
          Returns the status, if the file is version 4.
 boolean isVersion5()
          Returns the status, if the file is version 5.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static FileState getInstance(int value)

Returns an instance of the class with the given value.

Only the first 8 bits will be transfered, the rest is uninteresting.

Parameters:
value - The value.
Returns:
The instance.

isCrcOk

public boolean isCrcOk()
Returns the status, if the file matched the official CRC.

Returns:
The status.

isCrcError

public boolean isCrcError()
Returns the status, if the file didn't match the official CRC.

Returns:
The status.

isVersion2

public boolean isVersion2()
Returns the status, if the file is version 2.

Returns:
The status.

isVersion3

public boolean isVersion3()
Returns the status, if the file is version 3.

Returns:
The status.

isVersion4

public boolean isVersion4()
Returns the status, if the file is version 4.

Returns:
The status.

isVersion5

public boolean isVersion5()
Returns the status, if the file is version 5.

Returns:
The status.

isUncensored

public boolean isUncensored()
Returns the status, if the file is uncensored.

Returns:
The status.

isCensored

public boolean isCensored()
Returns the status, if the file is censored.

Returns:
The status.

getValue

public int getValue()
Returns the value.

Returns:
The value.

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object