@Test public void testStringObjectId() { String expectedId = UUID.randomUUID().toString(); StringObjectId obj = new StringObjectId( expectedId ); assertEquals( expectedId, obj.getId() ); assertEquals( expectedId, obj.toString() ); assertEquals( expectedId.hashCode(), obj.hashCode() ); assertFalse( obj.equals( null ) ); assertTrue( obj.equals( obj ) ); assertEquals( 0, obj.compareTo( obj ) ); StringObjectId clone = new StringObjectId( obj ); assertNotSame( obj, clone ); assertEquals( obj.getId(), clone.getId() ); }
public StringObjectId( String id ) { this.id = id; }
StringObjectId implements ObjectId, Comparable<StringObjectId> { public StringObjectId( String id ) { this.id = id; } }
StringObjectId implements ObjectId, Comparable<StringObjectId> { public StringObjectId( String id ) { this.id = id; } StringObjectId( String id );  StringObjectId( ObjectId objectId ); }
StringObjectId implements ObjectId, Comparable<StringObjectId> { public StringObjectId( String id ) { this.id = id; } StringObjectId( String id );  StringObjectId( ObjectId objectId ); @Override boolean equals( Object obj ); @Override int hashCode(); @Override int compareTo( StringObjectId o ); @Override String toString(); @Override String getId(); }
StringObjectId implements ObjectId, Comparable<StringObjectId> { public StringObjectId( String id ) { this.id = id; } StringObjectId( String id );  StringObjectId( ObjectId objectId ); @Override boolean equals( Object obj ); @Override int hashCode(); @Override int compareTo( StringObjectId o ); @Override String toString(); @Override String getId();  }